1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef APPS_SAVED_FILES_SERVICE_FACTORY_H_
6 #define APPS_SAVED_FILES_SERVICE_FACTORY_H_
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
18 class SavedFilesService;
20 // BrowserContextKeyedServiceFactory for SavedFilesService.
21 class SavedFilesServiceFactory : public BrowserContextKeyedServiceFactory {
23 static SavedFilesService* GetForBrowserContext(
24 content::BrowserContext* context);
26 static SavedFilesService* GetForBrowserContextIfExists(
27 content::BrowserContext* context);
29 static SavedFilesServiceFactory* GetInstance();
32 SavedFilesServiceFactory();
33 ~SavedFilesServiceFactory() override;
34 friend struct base::DefaultSingletonTraits<SavedFilesServiceFactory>;
36 KeyedService* BuildServiceInstanceFor(
37 content::BrowserContext* context) const override;
38 content::BrowserContext* GetBrowserContextToUse(
39 content::BrowserContext* context) const override;
41 DISALLOW_COPY_AND_ASSIGN(SavedFilesServiceFactory);
46 #endif // APPS_SAVED_FILES_SERVICE_FACTORY_H_