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

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

Issue 51433002: Enable permission warnings from ManifestHandlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review comments. Created 7 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/permissions_updater.cc
diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc
index 5ca9f53c4758fd383b746a7beedc4f0c0cc7ef36..824488543be281375f61bb8bfa922344c6d70e54 100644
--- a/chrome/browser/extensions/permissions_updater.cc
+++ b/chrome/browser/extensions/permissions_updater.cc
@@ -138,13 +138,16 @@ void PermissionsUpdater::NotifyPermissionsUpdated(
!i.IsAtEnd(); i.Advance()) {
RenderProcessHost* host = i.GetCurrentValue();
Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
- if (profile_->IsSameProfile(profile))
- host->Send(new ExtensionMsg_UpdatePermissions(
- static_cast<int>(reason),
- extension->id(),
- changed->apis(),
- changed->explicit_hosts(),
- changed->scriptable_hosts()));
+ if (profile_->IsSameProfile(profile)) {
+ ExtensionMsg_UpdatePermissions_Params info;
+ info.reason_id = static_cast<int>(reason);
+ info.extension_id = extension->id();
+ info.apis = changed->apis();
+ info.manifest_permissions = changed->manifest_permissions();
+ info.explicit_hosts = changed->explicit_hosts();
+ info.scriptable_hosts = changed->scriptable_hosts();
+ host->Send(new ExtensionMsg_UpdatePermissions(info));
+ }
}
// Trigger the onAdded and onRemoved events in the extension.

Powered by Google App Engine
This is Rietveld 408576698