| Index: chrome/browser/extensions/api/declarative/rules_cache_delegate.cc
|
| diff --git a/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc b/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc
|
| index 78de68a048f90b7a15bcb510b12dc16dd7c9077a..d92c6a57d6d1150bdd1b4c5021956e2b385bc3cc 100644
|
| --- a/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc
|
| +++ b/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "content/public/browser/notification_details.h"
|
| #include "content/public/browser/notification_source.h"
|
| +#include "extensions/browser/extension_registry.h"
|
| #include "extensions/browser/extension_system.h"
|
| #include "extensions/browser/info_map.h"
|
|
|
| @@ -75,7 +76,7 @@ void RulesCacheDelegate::Init(RulesRegistry* registry) {
|
| rules_registry_thread_ = registry->owner_thread();
|
|
|
| ExtensionSystem& system = *ExtensionSystem::Get(profile_);
|
| - extensions::StateStore* store = system.rules_store();
|
| + StateStore* store = system.rules_store();
|
| if (store)
|
| store->RegisterKey(storage_key_);
|
|
|
| @@ -162,7 +163,7 @@ void RulesCacheDelegate::ReadFromStorage(const std::string& extension_id) {
|
| return;
|
| }
|
|
|
| - extensions::StateStore* store = ExtensionSystem::Get(profile_)->rules_store();
|
| + StateStore* store = ExtensionSystem::Get(profile_)->rules_store();
|
| if (!store)
|
| return;
|
| waiting_for_extensions_.insert(extension_id);
|
| @@ -213,10 +214,9 @@ void RulesCacheDelegate::SetDeclarativeRulesStored(
|
| const std::string& extension_id,
|
| bool rules_stored) {
|
| CHECK(profile_);
|
| - ExtensionSystem& system = *ExtensionSystem::Get(profile_);
|
| - ExtensionService* extension_service = system.extension_service();
|
| - DCHECK(extension_service);
|
| - DCHECK(extension_service->GetInstalledExtension(extension_id));
|
| + DCHECK(ExtensionRegistry::Get(profile_)
|
| + ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING));
|
| +
|
| ExtensionScopedPrefs* extension_prefs = ExtensionPrefs::Get(profile_);
|
| extension_prefs->UpdateExtensionPref(
|
| extension_id,
|
|
|