| 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" |
| 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" |
| 12 |
| 13 namespace base { |
| 14 template <typename T> |
| 15 struct DefaultSingletonTraits; |
| 16 class TaskRunner; |
| 17 } |
| 18 |
| 19 namespace ios { |
| 20 class ChromeBrowserState; |
| 21 } |
| 22 |
| 23 class KeyedService; |
| 24 |
| 25 namespace favicon { |
| 26 class LargeIconService; |
| 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 |