Commit d1c04d24 authored by Danan S's avatar Danan S Committed by Commit Bot

Make ParentPermissionDialog not display optional permissions

This matches the behavior of regular extension install dialog in
the same situaton, because the parent permission dialog is never used
for delegated permissions, which the only time optional permissions
are shown in the regular extension install dialog, as can be seen at:
https://cs.chromium.org/chromium/src/chrome/browser/extensions/extension_install_prompt.cc?l=602

See bug for a concrete example of where this inconsistency appears.

Bug: 1067037
Change-Id: I5aab8d159d9abc8ba73347be187d0fdcb4034a70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2133217Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Dan S <danan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755924}
parent ce3d6e06
...@@ -689,7 +689,11 @@ void ParentPermissionDialogView::InitializeExtensionData( ...@@ -689,7 +689,11 @@ void ParentPermissionDialogView::InitializeExtensionData(
std::unique_ptr<const extensions::PermissionSet> permissions_to_display = std::unique_ptr<const extensions::PermissionSet> permissions_to_display =
extensions::util::GetInstallPromptPermissionSetForExtension( extensions::util::GetInstallPromptPermissionSetForExtension(
extension.get(), params_->profile, extension.get(), params_->profile,
true /* include_optional_permissions */); // Matches behavior of regular extension install prompt because this
// prompt is never used for delegated permissions, which the only
// time optional permissions are shown.
false /* include_optional_permissions */
);
extensions::Manifest::Type type = extension->GetType(); extensions::Manifest::Type type = extension->GetType();
prompt_permissions_.LoadFromPermissionSet(permissions_to_display.get(), type); prompt_permissions_.LoadFromPermissionSet(permissions_to_display.get(), type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment