Index: extensions/browser/user_script_loader.cc |
diff --git a/extensions/browser/user_script_loader.cc b/extensions/browser/user_script_loader.cc |
index 7daf95d22fe367431d9002748da60ff7b3245439..be4fa0d8e04031c5a385313eebc69743cafc9021 100644 |
--- a/extensions/browser/user_script_loader.cc |
+++ b/extensions/browser/user_script_loader.cc |
@@ -378,9 +378,9 @@ void UserScriptLoader::OnScriptsLoaded( |
void UserScriptLoader::SendUpdate(content::RenderProcessHost* process, |
base::SharedMemory* shared_memory, |
const std::set<HostID>& changed_hosts) { |
- // Don't allow injection of extensions' content scripts into <webview>. |
- if (process->IsIsolatedGuest() && host_id().id().empty()) |
- return; |
+ // Don't allow injection of non-whitelisted extensions' content scripts |
+ // into <webview>. |
+ bool whitelisted_only = process->IsIsolatedGuest() && host_id().id().empty(); |
// Make sure we only send user scripts to processes in our browser_context. |
if (!ExtensionsBrowserClient::Get()->IsSameContext( |
@@ -399,7 +399,9 @@ void UserScriptLoader::SendUpdate(content::RenderProcessHost* process, |
if (base::SharedMemory::IsHandleValid(handle_for_process)) { |
process->Send(new ExtensionMsg_UpdateUserScripts(handle_for_process, |
- host_id(), changed_hosts)); |
+ host_id(), |
+ changed_hosts, |
+ whitelisted_only)); |
} |
} |