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 01b7c1bdde77786bdff47fcbc463119691b67c04..cd69634cfcaf44352f7ea9b05896053260e6acb9 100644 |
--- a/chrome/browser/extensions/extension_event_router.cc |
+++ b/chrome/browser/extensions/extension_event_router.cc |
@@ -20,11 +20,13 @@ |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/extensions/extension.h" |
#include "chrome/common/extensions/extension_messages.h" |
+#include "chrome/common/extensions/api/extension_api.h" |
#include "content/browser/child_process_security_policy.h" |
#include "content/browser/renderer_host/render_process_host.h" |
#include "content/public/browser/notification_service.h" |
using content::BrowserThread; |
+using extensions::ExtensionAPI; |
namespace { |
@@ -274,8 +276,11 @@ void ExtensionEventRouter::DispatchEventImpl( |
listener->process->browser_context()); |
extensions::ProcessMap* process_map = |
listener_profile->GetExtensionService()->process_map(); |
- if (!process_map->Contains(extension->id(), listener->process->id())) |
+ |
+ if (ExtensionAPI::GetInstance()->IsPrivileged(event->event_name) && |
Yoyo Zhou
2011/11/16 23:51:13
Add a comment here to indicate what this check is
Aaron Boodman
2011/11/17 07:17:52
Done.
|
+ !process_map->Contains(extension->id(), listener->process->id())) { |
continue; |
+ } |
// Is this event from a different profile than the renderer (ie, an |
// incognito tab event sent to a normal process, or vice versa). |