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

Unified Diff: chrome/browser/extensions/declarative_user_script_master.cc

Issue 822453002: Introduce HostID and de-couple Extensions from "script injection System" [browser side] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 11 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/declarative_user_script_master.cc
diff --git a/chrome/browser/extensions/declarative_user_script_master.cc b/chrome/browser/extensions/declarative_user_script_master.cc
index fccd01150491ef3d4b31d2305112e28652aa7c52..40fc511dd964ec23196d31fd6677979381963d22 100644
--- a/chrome/browser/extensions/declarative_user_script_master.cc
+++ b/chrome/browser/extensions/declarative_user_script_master.cc
@@ -7,32 +7,20 @@
#include <set>
#include "chrome/browser/profiles/profile.h"
-#include "extensions/browser/extension_registry.h"
namespace extensions {
-DeclarativeUserScriptMaster::DeclarativeUserScriptMaster(
- Profile* profile,
- const ExtensionId& extension_id)
- : extension_id_(extension_id),
+DeclarativeUserScriptMaster::DeclarativeUserScriptMaster(Profile* profile,
+ const HostID& host_id)
+ : host_id_(host_id),
loader_(profile,
- extension_id,
- false /* listen_for_extension_system_loaded */),
- extension_registry_observer_(this) {
- extension_registry_observer_.Add(ExtensionRegistry::Get(profile));
+ host_id,
+ false /* listen_for_extension_system_loaded */) {
}
DeclarativeUserScriptMaster::~DeclarativeUserScriptMaster() {
}
-void DeclarativeUserScriptMaster::OnExtensionUnloaded(
- content::BrowserContext* browser_context,
- const Extension* extension,
- UnloadedExtensionInfo::Reason reason) {
- if (extension_id_ == extension->id())
- ClearScripts();
-}
-
void DeclarativeUserScriptMaster::AddScript(const UserScript& script) {
std::set<UserScript> set;
set.insert(script);
« no previous file with comments | « chrome/browser/extensions/declarative_user_script_master.h ('k') | chrome/browser/extensions/extension_user_script_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698