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

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: Fix unit test and clang presubmit errors. 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 f8a928eaa2e5bd699a542bacb5e501e391f4a6bb..1e38cb8d525322f57bdf6f8ca2d6902c2aec8260 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.
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/browser/extensions/permissions_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698