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

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

Issue 10832063: Don't dispatch window focus change events to other profiles. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/window_event_router.cc
diff --git a/chrome/browser/extensions/window_event_router.cc b/chrome/browser/extensions/window_event_router.cc
index 3804d0cd472b7f3f6f2e41ac46feda88976a47dc..dc056de22018f4026d00c98d7a01c30d8a0557a9 100644
--- a/chrome/browser/extensions/window_event_router.cc
+++ b/chrome/browser/extensions/window_event_router.cc
@@ -152,6 +152,10 @@ void WindowEventRouter::OnActiveWindowChanged(
if (!window_profile)
window_profile = previous_focused_profile;
+ if (!profile_->IsSameProfile(window_profile) ||
+ !ExtensionSystem::Get(window_profile)->event_router()) {
+ return;
+ }
ExtensionSystem::Get(window_profile)->event_router()->
DispatchEventsToRenderersAcrossIncognito(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698