Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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 IOS_CHROME_BROWSER_FAVICON_IOS_CHROME_LARGE_ICON_SERVICE_FACTORY_H_ | |
| 6 #define IOS_CHROME_BROWSER_FAVICON_IOS_CHROME_LARGE_ICON_SERVICE_FACTORY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/ref_counted.h" | |
|
sdefresne
2015/10/30 17:20:14
nit: Unused :-)
justincohen
2015/10/30 19:43:24
Done.
| |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" | |
| 12 | |
| 13 class KeyedService; | |
| 14 | |
| 15 namespace base { | |
| 16 template <typename T> | |
| 17 struct DefaultSingletonTraits; | |
| 18 class TaskRunner; | |
|
sdefresne
2015/10/30 17:20:14
nit: Unused :-)
justincohen
2015/10/30 19:43:24
Done.
| |
| 19 } | |
| 20 | |
| 21 namespace favicon { | |
| 22 class LargeIconService; | |
| 23 }; | |
| 24 | |
| 25 namespace ios { | |
| 26 class ChromeBrowserState; | |
| 27 } | |
| 28 | |
| 29 // Singleton that owns all LargeIconService and associates them with | |
| 30 // ChromeBrowserState. | |
| 31 class IOSChromeLargeIconServiceFactory | |
| 32 : public BrowserStateKeyedServiceFactory { | |
| 33 public: | |
| 34 static favicon::LargeIconService* GetForBrowserState( | |
| 35 ios::ChromeBrowserState* browser_state); | |
| 36 | |
| 37 static IOSChromeLargeIconServiceFactory* GetInstance(); | |
| 38 | |
| 39 private: | |
| 40 friend struct base::DefaultSingletonTraits<IOSChromeLargeIconServiceFactory>; | |
| 41 | |
| 42 IOSChromeLargeIconServiceFactory(); | |
| 43 ~IOSChromeLargeIconServiceFactory() override; | |
| 44 | |
| 45 // BrowserStateKeyedServiceFactory implementation. | |
| 46 scoped_ptr<KeyedService> BuildServiceInstanceFor( | |
| 47 web::BrowserState* context) const override; | |
| 48 web::BrowserState* GetBrowserStateToUse( | |
| 49 web::BrowserState* context) const override; | |
| 50 | |
| 51 DISALLOW_COPY_AND_ASSIGN(IOSChromeLargeIconServiceFactory); | |
| 52 }; | |
| 53 | |
| 54 #endif // IOS_CHROME_BROWSER_FAVICON_IOS_CHROME_LARGE_ICON_SERVICE_FACTORY_H_ | |
| OLD | NEW |