OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class AppListSyncableServiceFactory : public BrowserContextKeyedServiceFactory { | 22 class AppListSyncableServiceFactory : public BrowserContextKeyedServiceFactory { |
23 public: | 23 public: |
24 static AppListSyncableService* GetForProfile(Profile* profile); | 24 static AppListSyncableService* GetForProfile(Profile* profile); |
25 | 25 |
26 static AppListSyncableServiceFactory* GetInstance(); | 26 static AppListSyncableServiceFactory* GetInstance(); |
27 | 27 |
28 static scoped_ptr<KeyedService> BuildInstanceFor( | 28 static scoped_ptr<KeyedService> BuildInstanceFor( |
29 content::BrowserContext* browser_context); | 29 content::BrowserContext* browser_context); |
30 | 30 |
31 private: | 31 private: |
32 friend struct DefaultSingletonTraits<AppListSyncableServiceFactory>; | 32 friend struct base::DefaultSingletonTraits<AppListSyncableServiceFactory>; |
33 | 33 |
34 AppListSyncableServiceFactory(); | 34 AppListSyncableServiceFactory(); |
35 ~AppListSyncableServiceFactory() override; | 35 ~AppListSyncableServiceFactory() override; |
36 | 36 |
37 // BrowserContextKeyedServiceFactory: | 37 // BrowserContextKeyedServiceFactory: |
38 KeyedService* BuildServiceInstanceFor( | 38 KeyedService* BuildServiceInstanceFor( |
39 content::BrowserContext* profile) const override; | 39 content::BrowserContext* profile) const override; |
40 void RegisterProfilePrefs( | 40 void RegisterProfilePrefs( |
41 user_prefs::PrefRegistrySyncable* registry) override; | 41 user_prefs::PrefRegistrySyncable* registry) override; |
42 content::BrowserContext* GetBrowserContextToUse( | 42 content::BrowserContext* GetBrowserContextToUse( |
43 content::BrowserContext* context) const override; | 43 content::BrowserContext* context) const override; |
44 bool ServiceIsCreatedWithBrowserContext() const override; | 44 bool ServiceIsCreatedWithBrowserContext() const override; |
45 bool ServiceIsNULLWhileTesting() const override; | 45 bool ServiceIsNULLWhileTesting() const override; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(AppListSyncableServiceFactory); | 47 DISALLOW_COPY_AND_ASSIGN(AppListSyncableServiceFactory); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace app_list | 50 } // namespace app_list |
51 | 51 |
52 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_ | 52 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_FACTORY_H_ |
OLD | NEW |