| 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,
|
|
|