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

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: Remove Host::IsEmpty() and move ExtensionConsumer to extensions/renderer. 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 fde6bcd7fca38ba0845592bea9bc2ff351669f9e..1700dced9847ecf469c1eb97d7c521edf89f7b72 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -234,7 +234,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.
@@ -1026,7 +1027,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