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 d2a45fb8e29d0fee13c1db42b6d6b4bb3a817b67..44e5d57bb307ae451705e503e0814d03653f8354 100644 |
--- a/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc |
+++ b/chrome/browser/extensions/api/declarative/rules_cache_delegate.cc |
@@ -79,10 +79,6 @@ void RulesCacheDelegate::Init(RulesRegistry* registry) { |
if (store) |
store->RegisterKey(storage_key_); |
- registrar_.Add(this, |
- chrome::NOTIFICATION_EXTENSION_LOADED, |
- content::Source<Profile>(profile_->GetOriginalProfile())); |
- |
if (profile_->IsOffTheRecord()) |
log_storage_init_delay_ = false; |
@@ -114,29 +110,6 @@ void RulesCacheDelegate::WriteToStorage(const std::string& extension_id, |
store->SetExtensionValue(extension_id, storage_key_, value.Pass()); |
} |
-void RulesCacheDelegate::Observe( |
- int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) { |
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
- DCHECK_EQ(chrome::NOTIFICATION_EXTENSION_LOADED, type); |
- |
- const extensions::Extension* extension = |
- content::Details<const extensions::Extension>(details).ptr(); |
- // TODO(mpcomplete): This API check should generalize to any use of |
- // declarative rules, not just webRequest. |
- if (extension->HasAPIPermission(APIPermission::kDeclarativeContent) || |
- extension->HasAPIPermission(APIPermission::kDeclarativeWebRequest)) { |
- InfoMap* extension_info_map = ExtensionSystem::Get(profile_)->info_map(); |
- if (profile_->IsOffTheRecord() && |
- !extension_info_map->IsIncognitoEnabled(extension->id())) { |
- // Ignore this extension. |
- } else { |
- ReadFromStorage(extension->id()); |
- } |
- } |
-} |
- |
void RulesCacheDelegate::CheckIfReady() { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
if (notified_registry_ || !waiting_for_extensions_.empty()) |