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

Unified Diff: chrome/browser/extensions/blacklist_factory.cc

Issue 698553002: Split Blacklist from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. 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
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
+
« no previous file with comments | « chrome/browser/extensions/blacklist_factory.h ('k') | chrome/browser/extensions/extension_install_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698