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

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

Issue 4234004: Fix some UI issues with omnibox extensions in incognito. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 10 years, 1 month 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
Index: chrome/browser/extensions/extension_event_router.cc
diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc
index c03345445ff104262a492037cc24d6a2e13f5db8..4fc48e38f591f2e0fac9936708d10cf2d330f835 100644
--- a/chrome/browser/extensions/extension_event_router.cc
+++ b/chrome/browser/extensions/extension_event_router.cc
@@ -168,6 +168,7 @@ void ExtensionEventRouter::DispatchEventImpl(
return;
std::set<EventListener>& listeners = it->second;
+ ExtensionsService* service = profile_->GetExtensionsService();
// Send the event only to renderers that are listening for it.
for (std::set<EventListener>::iterator listener = listeners.begin();
@@ -185,7 +186,9 @@ void ExtensionEventRouter::DispatchEventImpl(
// incognito tab event sent to a normal process, or vice versa).
bool cross_incognito = restrict_to_profile &&
listener->process->profile() != restrict_to_profile;
- if (cross_incognito && !CanCrossIncognito(profile_, listener->extension_id))
+ const Extension* extension = service->GetExtensionById(
+ listener->extension_id, false);
+ if (cross_incognito && !service->CanCrossIncognito(extension))
continue;
DispatchEvent(listener->process, listener->extension_id,
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698