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