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

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

Issue 10406013: Support extension precedences in declarative WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Matt's comments Created 8 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_registry_service.cc
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_service.cc b/chrome/browser/extensions/api/declarative/rules_registry_service.cc
index 7db8dd8caf36a7a51d47d9ef703596b35cae44f8..ca665c627a19453e17e6d9716efa6a51fd976c84 100644
--- a/chrome/browser/extensions/api/declarative/rules_registry_service.cc
+++ b/chrome/browser/extensions/api/declarative/rules_registry_service.cc
@@ -29,7 +29,8 @@ void RegisterToExtensionWebRequestEventRouterOnIO(
} // namespace
-RulesRegistryService::RulesRegistryService(Profile* profile) {
+RulesRegistryService::RulesRegistryService(Profile* profile)
+ : profile_(profile) {
if (profile) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile));
@@ -40,7 +41,7 @@ RulesRegistryService::~RulesRegistryService() {}
void RulesRegistryService::RegisterDefaultRulesRegistries() {
scoped_refptr<WebRequestRulesRegistry> web_request_rules_registry(
- new WebRequestRulesRegistry);
+ new WebRequestRulesRegistry(profile_));
RegisterRulesRegistry(declarative_webrequest_constants::kOnRequest,
web_request_rules_registry);
content::BrowserThread::PostTask(

Powered by Google App Engine
This is Rietveld 408576698