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

Unified Diff: trunk/src/chrome/browser/extensions/api/declarative/rules_registry_service.cc

Issue 16109003: Revert 202751 "Change RulesRegistryService to use ProfileKeyedAPI." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 months 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: trunk/src/chrome/browser/extensions/api/declarative/rules_registry_service.cc
===================================================================
--- trunk/src/chrome/browser/extensions/api/declarative/rules_registry_service.cc (revision 202762)
+++ trunk/src/chrome/browser/extensions/api/declarative/rules_registry_service.cc (working copy)
@@ -5,7 +5,6 @@
#include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
#include "base/bind.h"
-#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/api/declarative/initializing_rules_registry.h"
@@ -36,8 +35,7 @@
: profile_(profile) {
if (profile) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
- content::Source<Profile>(profile->GetOriginalProfile()));
- RegisterDefaultRulesRegistries();
+ content::Source<Profile>(profile->GetOriginalProfile()));
}
}
@@ -72,20 +70,6 @@
profile_, scoped_refptr<WebRequestRulesRegistry>(NULL)));
}
-static base::LazyInstance<ProfileKeyedAPIFactory<RulesRegistryService> >
-g_factory = LAZY_INSTANCE_INITIALIZER;
-
-// static
-ProfileKeyedAPIFactory<RulesRegistryService>*
-RulesRegistryService::GetFactoryInstance() {
- return &g_factory.Get();
-}
-
-// static
-RulesRegistryService* RulesRegistryService::Get(Profile* profile) {
- return ProfileKeyedAPIFactory<RulesRegistryService>::GetForProfile(profile);
-}
-
void RulesRegistryService::RegisterRulesRegistry(
scoped_refptr<RulesRegistry> rule_registry) {
const std::string event_name(rule_registry->event_name());

Powered by Google App Engine
This is Rietveld 408576698