Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: extensions/browser/warning_service_factory.cc

Issue 698623002: Split WarningService from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: virtual -> override Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/warning_service_factory.h ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « extensions/browser/warning_service_factory.h ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698