| Index: chrome/browser/extensions/blacklist_factory.cc
|
| diff --git a/extensions/browser/warning_service_factory.cc b/chrome/browser/extensions/blacklist_factory.cc
|
| similarity index 50%
|
| copy from extensions/browser/warning_service_factory.cc
|
| copy to chrome/browser/extensions/blacklist_factory.cc
|
| index 9f0bc09b19181318a14ad6e45161b06163b3f86f..2b277a985ecd8634c22f55c2454c74d4212dfa34 100644
|
| --- a/extensions/browser/warning_service_factory.cc
|
| +++ b/chrome/browser/extensions/blacklist_factory.cc
|
| @@ -2,48 +2,48 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "extensions/browser/warning_service_factory.h"
|
| -
|
| +#include "chrome/browser/extensions/blacklist.h"
|
| +#include "chrome/browser/extensions/blacklist_factory.h"
|
| #include "components/keyed_service/content/browser_context_dependency_manager.h"
|
| -#include "extensions/browser/extension_registry_factory.h"
|
| +#include "extensions/browser/extension_prefs.h"
|
| +#include "extensions/browser/extension_prefs_factory.h"
|
| #include "extensions/browser/extensions_browser_client.h"
|
| -#include "extensions/browser/warning_service.h"
|
|
|
| using content::BrowserContext;
|
|
|
| namespace extensions {
|
|
|
| // static
|
| -WarningService* WarningServiceFactory::GetForBrowserContext(
|
| - BrowserContext* context) {
|
| - return static_cast<WarningService*>(
|
| +Blacklist* BlacklistFactory::GetForBrowserContext(BrowserContext* context) {
|
| + return static_cast<Blacklist*>(
|
| GetInstance()->GetServiceForBrowserContext(context, true));
|
| }
|
|
|
| // static
|
| -WarningServiceFactory* WarningServiceFactory::GetInstance() {
|
| - return Singleton<WarningServiceFactory>::get();
|
| +BlacklistFactory* BlacklistFactory::GetInstance() {
|
| + return Singleton<BlacklistFactory>::get();
|
| }
|
|
|
| -WarningServiceFactory::WarningServiceFactory()
|
| +BlacklistFactory::BlacklistFactory()
|
| : BrowserContextKeyedServiceFactory(
|
| - "WarningService",
|
| + "Blacklist",
|
| BrowserContextDependencyManager::GetInstance()) {
|
| - DependsOn(ExtensionRegistryFactory::GetInstance());
|
| + DependsOn(extensions::ExtensionPrefsFactory::GetInstance());
|
| }
|
|
|
| -WarningServiceFactory::~WarningServiceFactory() {
|
| +BlacklistFactory::~BlacklistFactory() {
|
| }
|
|
|
| -KeyedService* WarningServiceFactory::BuildServiceInstanceFor(
|
| +KeyedService* BlacklistFactory::BuildServiceInstanceFor(
|
| BrowserContext* context) const {
|
| - return new WarningService(context);
|
| + return new Blacklist(ExtensionPrefs::Get(context));
|
| }
|
|
|
| -BrowserContext* WarningServiceFactory::GetBrowserContextToUse(
|
| +BrowserContext* BlacklistFactory::GetBrowserContextToUse(
|
| BrowserContext* context) const {
|
| // Redirected in incognito.
|
| return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
|
| }
|
|
|
| } // namespace extensions
|
| +
|
|
|