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

Unified Diff: chrome/browser/extensions/api/declarative/rules_cache_delegate.cc

Issue 290293002: clenaup: Removed deprecated GetInstalledExtension function from c/b/e/api (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: 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..33a30a52827f88a07c046859d821f6f46d7e8680 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,10 @@ 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));
+ ExtensionRegistry* registry = ExtensionRegistry::Get(profile_);
Devlin 2014/05/22 22:09:12 Could you inline this? DCHECK(ExtensionRegistry::G
limasdf 2014/05/23 15:19:41 Done.
+ DCHECK(
+ registry->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING));
+
ExtensionScopedPrefs* extension_prefs = ExtensionPrefs::Get(profile_);
extension_prefs->UpdateExtensionPref(
extension_id,

Powered by Google App Engine
This is Rietveld 408576698