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

Unified Diff: chrome/browser/extensions/user_script_master.cc

Issue 7248008: Fix content script injection when multi-profiles are enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the early return to the top of SendUpdate. Created 9 years, 6 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 | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/user_script_master.cc
diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc
index 78f2335889e64e2e39f9a41df3c140cfc3261826..60f8be0502dba7d036a3f8126950c7640f31b98e 100644
--- a/chrome/browser/extensions/user_script_master.cc
+++ b/chrome/browser/extensions/user_script_master.cc
@@ -362,6 +362,10 @@ void UserScriptMaster::StartLoad() {
void UserScriptMaster::SendUpdate(RenderProcessHost* process,
base::SharedMemory* shared_memory) {
+ // Make sure we only send user scripts to processes in our profile.
+ if (!profile_->IsSameProfile(process->profile()))
+ return;
+
// If the process is being started asynchronously, early return. We'll end up
// calling InitUserScripts when it's created which will call this again.
base::ProcessHandle handle = process->GetHandle();
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698