Chromium Code Reviews| Index: chrome/browser/favicon/chrome_fallback_icon_client_factory.h |
| diff --git a/chrome/browser/ui/bookmarks/enhanced_bookmark_key_service_factory.h b/chrome/browser/favicon/chrome_fallback_icon_client_factory.h |
| similarity index 40% |
| copy from chrome/browser/ui/bookmarks/enhanced_bookmark_key_service_factory.h |
| copy to chrome/browser/favicon/chrome_fallback_icon_client_factory.h |
| index 5d6ce10fc1d4caf59b6712f261948d306261909c..2f9ad5623aed34bfc5cdc3c85d9240918a9d6dd4 100644 |
| --- a/chrome/browser/ui/bookmarks/enhanced_bookmark_key_service_factory.h |
| +++ b/chrome/browser/favicon/chrome_fallback_icon_client_factory.h |
| @@ -2,42 +2,43 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_ |
| -#define CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_ |
| +#ifndef CHROME_BROWSER_FAVICON_CHROME_FALLBACK_ICON_CLIENT_FACTORY_H_ |
| +#define CHROME_BROWSER_FAVICON_CHROME_FALLBACK_ICON_CLIENT_FACTORY_H_ |
| -#include "base/macros.h" |
| #include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
| -namespace content { |
| -class BrowserContext; |
| -} // namespace content |
| - |
| template <typename T> struct DefaultSingletonTraits; |
| -class EnhancedBookmarkKeyService; |
| +class FallbackIconClient; |
| -// Singleton that owns all EnhancedBookmarkKeyServices and associates them with |
| -// BrowserContexts. |
| -class EnhancedBookmarkKeyServiceFactory |
| +namespace content { |
| +class BrowserContext; |
| +} |
| + |
| +// Singleton that owns all ChromeFallbackIconClients and associates them with |
| +// Profiles. |
| +class ChromeFallbackIconClientFactory |
| : public BrowserContextKeyedServiceFactory { |
| public: |
| - static EnhancedBookmarkKeyServiceFactory* GetInstance(); |
| + // Returns the instance of FallbackIconClient associated with this profile |
| + // (creating one if none exists). |
| + static FallbackIconClient* GetForBrowserContext( |
| + content::BrowserContext* context); |
| + |
| + // Returns an instance of the factory singleton. |
| + static ChromeFallbackIconClientFactory* GetInstance(); |
| private: |
| - friend struct DefaultSingletonTraits<EnhancedBookmarkKeyServiceFactory>; |
| + friend struct DefaultSingletonTraits<ChromeFallbackIconClientFactory>; |
| - EnhancedBookmarkKeyServiceFactory(); |
| - ~EnhancedBookmarkKeyServiceFactory() override; |
| + ChromeFallbackIconClientFactory(); |
| + ~ChromeFallbackIconClientFactory() override; |
| // BrowserContextKeyedServiceFactory: |
| KeyedService* BuildServiceInstanceFor( |
| - content::BrowserContext* context) const override; |
| + content::BrowserContext* /* context */) const override; |
|
pkotwicz
2015/03/27 18:47:57
Nit: Don't comment out |context| in the header
huangs
2015/03/27 19:01:51
I thought that's standard practice to specify that
|
| content::BrowserContext* GetBrowserContextToUse( |
| content::BrowserContext* context) const override; |
| - bool ServiceIsCreatedWithBrowserContext() const override; |
| - bool ServiceIsNULLWhileTesting() const override; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(EnhancedBookmarkKeyServiceFactory); |
| }; |
| -#endif // CHROME_BROWSER_UI_BOOKMARKS_ENHANCED_BOOKMARK_KEY_SERVICE_FACTORY_H_ |
| +#endif // CHROME_BROWSER_FAVICON_CHROME_FALLBACK_ICON_CLIENT_FACTORY_H_ |