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

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

Issue 1995533002: Extensions: Grant nuisance and already-implied permissions on update (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 046574a66719d3d1215236b978ec04a1f35d5217..93c7c595a9608db4cb0025a10e1f7202aef4240b 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1600,6 +1600,13 @@ void ExtensionService::CheckPermissionsIncrease(const Extension* extension,
*granted_permissions,
extension->permissions_data()->active_permissions(),
extension->GetType());
+
+ // If there was no privilege increase, the extension might still have new
+ // permissions (which either don't generate a warning message, or whose
+ // warning messages are suppressed by existing permissions). Grant the new
+ // permissions.
+ if (!is_privilege_increase)
+ GrantPermissions(extension);
}
if (is_extension_installed) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698