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

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

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.h
===================================================================
--- trunk/src/chrome/browser/extensions/api/declarative/rules_registry_service.h (revision 202762)
+++ trunk/src/chrome/browser/extensions/api/declarative/rules_registry_service.h (working copy)
@@ -13,7 +13,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "chrome/browser/extensions/api/declarative/rules_registry_with_cache.h"
-#include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -35,22 +34,15 @@
// This class owns all RulesRegistries implementations of an ExtensionService.
// This class lives on the UI thread.
-class RulesRegistryService : public ProfileKeyedAPI,
- public content::NotificationObserver {
+class RulesRegistryService : public content::NotificationObserver {
public:
explicit RulesRegistryService(Profile* profile);
virtual ~RulesRegistryService();
// Unregisters refptrs to concrete RulesRegistries at other objects that were
// created by us so that the RulesRegistries can be released.
- virtual void Shutdown() OVERRIDE;
+ void Shutdown();
- // ProfileKeyedAPI implementation.
- static ProfileKeyedAPIFactory<RulesRegistryService>* GetFactoryInstance();
-
- // Convenience method to get the RulesRegistryService for a profile.
- static RulesRegistryService* Get(Profile* profile);
-
// Registers the default RulesRegistries used in Chromium.
void RegisterDefaultRulesRegistries();
@@ -70,8 +62,6 @@
// For testing.
void SimulateExtensionUnloaded(const std::string& extension_id);
private:
- friend class ProfileKeyedAPIFactory<RulesRegistryService>;
-
// Maps event names to RuleRegistries that handle these events.
typedef std::map<std::string, scoped_refptr<RulesRegistry> > RulesRegistryMap;
@@ -85,13 +75,6 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // ProfileKeyedAPI implementation.
- static const char* service_name() {
- return "RulesRegistryService";
- }
- static const bool kServiceHasOwnInstanceInIncognito = true;
- static const bool kServiceIsNULLWhileTesting = true;
-
RulesRegistryMap rule_registries_;
// We own the parts of the registries which need to run on the UI thread.

Powered by Google App Engine
This is Rietveld 408576698