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

Unified Diff: chrome/browser/extensions/api/declarative_content/content_rules_registry.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: rebase 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_content/content_rules_registry.cc
diff --git a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
index b86fe9d070ea19bfba981836905b39150f5a19b2..7b379c1a67f2eeade2c708a517bd25de1713f5a7 100644
--- a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
+++ b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/extensions/api/declarative_content/content_action.h"
#include "chrome/browser/extensions/api/declarative_content/content_condition.h"
#include "chrome/browser/extensions/api/declarative_content/content_constants.h"
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/navigation_details.h"
@@ -16,6 +15,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension_messages.h"
@@ -138,9 +138,9 @@ ContentRulesRegistry::GetMatches(
std::string ContentRulesRegistry::AddRulesImpl(
const std::string& extension_id,
const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) {
- ExtensionService* service =
- ExtensionSystem::Get(profile())->extension_service();
- const Extension* extension = service->GetInstalledExtension(extension_id);
+ const Extension* extension =
+ ExtensionRegistry::Get(profile())
+ ->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING);
DCHECK(extension) << "Must have extension with id " << extension_id;
base::Time extension_installation_time =

Powered by Google App Engine
This is Rietveld 408576698