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

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

Issue 968183002: Extension install prompt: in the delegated permissions prompt, include optional permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@testext_permission_prompt
Patch Set: Created 5 years, 10 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_install_prompt.cc
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index 00146cf1364c30d980fbbddfbca2e15075278bb8..75c98a395964615afcbd8306991560f2f8526a12 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -36,6 +36,7 @@
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
+#include "extensions/common/manifest_handlers/permissions_parser.h"
#include "extensions/common/permissions/permission_message_provider.h"
#include "extensions/common/permissions/permission_set.h"
#include "extensions/common/permissions/permissions_data.h"
@@ -924,6 +925,13 @@ void ExtensionInstallPrompt::ShowConfirmation() {
.InitializePermissions(extension_);
permissions_to_display =
extension_->permissions_data()->active_permissions();
+ if (prompt_->type() == DELEGATED_PERMISSIONS_PROMPT) {
not at google - send to devlin 2015/03/02 17:52:00 Why?
Marc Treib 2015/03/02 18:15:41 In delegated installs, the custodian "pre-approves
+ scoped_refptr<const PermissionSet> optional_permissions =
+ extensions::PermissionsParser::GetOptionalPermissions(extension_);
+ permissions_to_display = PermissionSet::CreateUnion(
+ permissions_to_display.get(),
+ optional_permissions.get());
+ }
}
if (permissions_to_display.get() &&
« 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