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

Unified Diff: extensions/browser/user_script_loader.cc

Issue 972863002: Revert of Refactoring: de-couple Extensions from "script injection System" [render side]:2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_1
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
« no previous file with comments | « no previous file | extensions/common/user_script.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/user_script_loader.cc
diff --git a/extensions/browser/user_script_loader.cc b/extensions/browser/user_script_loader.cc
index cc0ce00cf82f4c2d9a8e0122ca8f6b1d082207c6..2b836332feba5479d89b2d0b271eeab152d76386 100644
--- a/extensions/browser/user_script_loader.cc
+++ b/extensions/browser/user_script_loader.cc
@@ -444,24 +444,11 @@
// We've got scripts ready to go.
shared_memory_.reset(shared_memory.release());
- // If user scripts are comming 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_);
}
changed_hosts_.clear();
« no previous file with comments | « no previous file | extensions/common/user_script.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698