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

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

Issue 7695003: Fix issue with permissions extension API event listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/test/data/extensions/api_test/permissions/optional/background.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_permissions_api.cc
diff --git a/chrome/browser/extensions/extension_permissions_api.cc b/chrome/browser/extensions/extension_permissions_api.cc
index cbaa7192d5f3a6cef743893e8c98144dc404ef3d..83f3eedca9cdf928cdb0a4cea8c1bb5af117b2ec 100644
--- a/chrome/browser/extensions/extension_permissions_api.cc
+++ b/chrome/browser/extensions/extension_permissions_api.cc
@@ -201,9 +201,6 @@ void ExtensionPermissionsManager::NotifyPermissionsUpdated(
Source<Profile>(extension_service_->profile()),
Details<UpdatedExtensionPermissionsInfo>(&info));
- // Trigger the onAdded and onRemoved events in the extension.
- DispatchEvent(extension->id(), event_name, changed);
-
// Send the new permissions to the renderers.
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
@@ -217,6 +214,9 @@ void ExtensionPermissionsManager::NotifyPermissionsUpdated(
changed->explicit_hosts(),
changed->scriptable_hosts()));
}
+
+ // Trigger the onAdded and onRemoved events in the extension.
+ DispatchEvent(extension->id(), event_name, changed);
}
bool ContainsPermissionsFunction::RunImpl() {
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/permissions/optional/background.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698