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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 885493007: Refactoring: de-couple Extensions from "script injection System" [render side] : 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 4a4dd2ac1483fbd420377e5c69261cd0896b5726..755d8176c5a9f8ac4792beb629b9824f9e28cea7 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -235,7 +235,8 @@ const Extension* Dispatcher::GetExtensionFromFrameAndWorld(
std::string extension_id;
if (world_id != 0) {
// Isolated worlds (content script).
- extension_id = ScriptInjection::GetExtensionIdForIsolatedWorld(world_id);
+ extension_id =
+ ScriptInjection::GetHostIdForIsolatedWorld(world_id).id();
} else if (!frame->document().securityOrigin().isUnique()) {
// TODO(kalman): Delete the above check.
@@ -1034,7 +1035,7 @@ void Dispatcher::OnUnloaded(const std::string& id) {
// If the extension is later reloaded with a different set of permissions,
// we'd like it to get a new isolated world ID, so that it can pick up the
// changed origin whitelist.
- ScriptInjection::RemoveIsolatedWorld(id);
+ ScriptInjection::RemoveIsolatedWorld(HostID(HostID::EXTENSIONS, id));
// Invalidate all of the contexts that were removed.
// TODO(kalman): add an invalidation observer interface to ScriptContext.

Powered by Google App Engine
This is Rietveld 408576698