| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "extensions/browser/extension_pref_value_map_factory.h" | 5 #include "chrome/browser/favicon/chrome_fallback_icon_client_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" |
| 8 #include "chrome/browser/favicon/chrome_fallback_icon_client.h" |
| 9 #include "chrome/browser/profiles/incognito_helpers.h" |
| 7 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 8 #include "extensions/browser/extension_pref_value_map.h" | 11 #include "content/public/browser/browser_context.h" |
| 9 | 12 |
| 10 ExtensionPrefValueMapFactory::ExtensionPrefValueMapFactory() | 13 ChromeFallbackIconClientFactory::ChromeFallbackIconClientFactory() |
| 11 : BrowserContextKeyedServiceFactory( | 14 : BrowserContextKeyedServiceFactory( |
| 12 "ExtensionPrefValueMap", | 15 "ChromeFallbackIconClient", |
| 13 BrowserContextDependencyManager::GetInstance()) { | 16 BrowserContextDependencyManager::GetInstance()) { |
| 14 } | 17 } |
| 15 | 18 |
| 16 ExtensionPrefValueMapFactory::~ExtensionPrefValueMapFactory() { | 19 ChromeFallbackIconClientFactory::~ChromeFallbackIconClientFactory() { |
| 17 } | 20 } |
| 18 | 21 |
| 19 // static | 22 // static |
| 20 ExtensionPrefValueMap* ExtensionPrefValueMapFactory::GetForBrowserContext( | 23 FallbackIconClient* ChromeFallbackIconClientFactory::GetForBrowserContext( |
| 21 content::BrowserContext* context) { | 24 content::BrowserContext* context) { |
| 22 return static_cast<ExtensionPrefValueMap*>( | 25 return static_cast<FallbackIconClient*>( |
| 23 GetInstance()->GetServiceForBrowserContext(context, true)); | 26 GetInstance()->GetServiceForBrowserContext(context, true)); |
| 24 } | 27 } |
| 25 | 28 |
| 26 // static | 29 // static |
| 27 ExtensionPrefValueMapFactory* ExtensionPrefValueMapFactory::GetInstance() { | 30 ChromeFallbackIconClientFactory* |
| 28 return Singleton<ExtensionPrefValueMapFactory>::get(); | 31 ChromeFallbackIconClientFactory::GetInstance() { |
| 32 return Singleton<ChromeFallbackIconClientFactory>::get(); |
| 29 } | 33 } |
| 30 | 34 |
| 31 KeyedService* ExtensionPrefValueMapFactory::BuildServiceInstanceFor( | 35 KeyedService* ChromeFallbackIconClientFactory::BuildServiceInstanceFor( |
| 32 content::BrowserContext* context) const { | 36 content::BrowserContext* context) const { |
| 33 return new ExtensionPrefValueMap(); | 37 return new ChromeFallbackIconClient(); |
| 34 } | 38 } |
| OLD | NEW |