Chromium Code Reviews| Index: extensions/browser/user_script_loader.cc |
| diff --git a/extensions/browser/user_script_loader.cc b/extensions/browser/user_script_loader.cc |
| index 1a0571870782474a1c94e1bc64150f1659793002..c635ed5c6d9390f9cef710b171b5a7c45ce26e82 100644 |
| --- a/extensions/browser/user_script_loader.cc |
| +++ b/extensions/browser/user_script_loader.cc |
| @@ -444,25 +444,10 @@ void UserScriptLoader::OnScriptsLoaded( |
| // We've got scripts ready to go. |
| shared_memory_.reset(shared_memory.release()); |
| - // If user scripts are coming from a <webview>, will only notify the |
| - // RenderProcessHost of that <webview>; otherwise will notify all of the |
| - // RenderProcessHosts. |
| - if (user_scripts_ && !user_scripts_->empty() && |
| - (*user_scripts_)[0].consumer_instance_type() == |
| - UserScript::ConsumerInstanceType::WEBVIEW) { |
| - DCHECK_EQ(1u, user_scripts_->size()); |
| - int render_process_id = |
| - (*user_scripts_)[0].routing_info().render_process_id; |
| - content::RenderProcessHost* host = |
| - content::RenderProcessHost::FromID(render_process_id); |
| - if (host) |
| - SendUpdate(host, shared_memory_.get(), changed_hosts_); |
| - } else { |
| - for (content::RenderProcessHost::iterator i( |
| - content::RenderProcessHost::AllHostsIterator()); |
| - !i.IsAtEnd(); i.Advance()) { |
| - SendUpdate(i.GetCurrentValue(), shared_memory_.get(), changed_hosts_); |
| - } |
| + for (content::RenderProcessHost::iterator i( |
| + content::RenderProcessHost::AllHostsIterator()); |
| + !i.IsAtEnd(); i.Advance()) { |
| + SendUpdate(i.GetCurrentValue(), shared_memory_.get(), changed_hosts_); |
|
Fady Samuel
2015/04/01 00:00:32
SendUpdate should contain a flag indicating whethe
Xi Han
2015/04/01 22:14:42
Done.
|
| } |
| changed_hosts_.clear(); |
| @@ -475,10 +460,6 @@ void UserScriptLoader::OnScriptsLoaded( |
| void UserScriptLoader::SendUpdate(content::RenderProcessHost* process, |
| base::SharedMemory* shared_memory, |
| const std::set<HostID>& changed_hosts) { |
| - // Don't allow injection of content scripts into <webview>. |
| - if (process->IsIsolatedGuest()) |
| - return; |
| - |
| // Make sure we only send user scripts to processes in our browser_context. |
| if (!ExtensionsBrowserClient::Get()->IsSameContext( |
| browser_context_, process->GetBrowserContext())) |