Upload upstream chromium 67.0.3396
[platform/framework/web/chromium-efl.git] / apps / saved_files_service_factory.h
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.
4
5 #ifndef APPS_SAVED_FILES_SERVICE_FACTORY_H_
6 #define APPS_SAVED_FILES_SERVICE_FACTORY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace apps {
17
18 class SavedFilesService;
19
20 // BrowserContextKeyedServiceFactory for SavedFilesService.
21 class SavedFilesServiceFactory : public BrowserContextKeyedServiceFactory {
22  public:
23   static SavedFilesService* GetForBrowserContext(
24       content::BrowserContext* context);
25
26   static SavedFilesService* GetForBrowserContextIfExists(
27       content::BrowserContext* context);
28
29   static SavedFilesServiceFactory* GetInstance();
30
31  private:
32   SavedFilesServiceFactory();
33   ~SavedFilesServiceFactory() override;
34   friend struct base::DefaultSingletonTraits<SavedFilesServiceFactory>;
35
36   KeyedService* BuildServiceInstanceFor(
37       content::BrowserContext* context) const override;
38   content::BrowserContext* GetBrowserContextToUse(
39       content::BrowserContext* context) const override;
40
41   DISALLOW_COPY_AND_ASSIGN(SavedFilesServiceFactory);
42 };
43
44 }  // namespace apps
45
46 #endif  // APPS_SAVED_FILES_SERVICE_FACTORY_H_