[Extensions] Remove withheld permissions from install prompt
We no longer need to display withheld permissions in the
extension install prompt, even with the runtime host permissions
feature enabled. Clean up the relevant code.
Bug: 841099
Change-Id: If295d36859f8664928c83923a010057f2fb4d1c1
Reviewed-on: https://chromium-review.googlesource.com/1053178
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Karan Bhatia <[email protected]>
Commit-Queue: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#558882}
diff --git a/chrome/browser/extensions/external_install_error.cc b/chrome/browser/extensions/external_install_error.cc
index fa54735..4ac7215 100644
--- a/chrome/browser/extensions/external_install_error.cc
+++ b/chrome/browser/extensions/external_install_error.cc
@@ -243,11 +243,6 @@
std::vector<base::string16>
ExternalInstallBubbleAlert::GetBubbleViewMessages() {
- ExtensionInstallPrompt::PermissionsType regular_permissions =
- ExtensionInstallPrompt::PermissionsType::REGULAR_PERMISSIONS;
- ExtensionInstallPrompt::PermissionsType withheld_permissions =
- ExtensionInstallPrompt::PermissionsType::WITHHELD_PERMISSIONS;
-
std::vector<base::string16> messages;
int heading_id =
IDS_EXTENSION_EXTERNAL_INSTALL_ALERT_BUBBLE_HEADING_EXTENSION;
@@ -257,22 +252,11 @@
heading_id = IDS_EXTENSION_EXTERNAL_INSTALL_ALERT_BUBBLE_HEADING_THEME;
messages.push_back(l10n_util::GetStringUTF16(heading_id));
- if (prompt_->GetPermissionCount(regular_permissions)) {
- messages.push_back(prompt_->GetPermissionsHeading(regular_permissions));
- for (size_t i = 0; i < prompt_->GetPermissionCount(regular_permissions);
- ++i) {
+ if (prompt_->GetPermissionCount()) {
+ messages.push_back(prompt_->GetPermissionsHeading());
+ for (size_t i = 0; i < prompt_->GetPermissionCount(); ++i) {
messages.push_back(l10n_util::GetStringFUTF16(
- IDS_EXTENSION_PERMISSION_LINE,
- prompt_->GetPermission(i, regular_permissions)));
- }
- }
- if (prompt_->GetPermissionCount(withheld_permissions)) {
- messages.push_back(prompt_->GetPermissionsHeading(withheld_permissions));
- for (size_t i = 0; i < prompt_->GetPermissionCount(withheld_permissions);
- ++i) {
- messages.push_back(l10n_util::GetStringFUTF16(
- IDS_EXTENSION_PERMISSION_LINE,
- prompt_->GetPermission(i, withheld_permissions)));
+ IDS_EXTENSION_PERMISSION_LINE, prompt_->GetPermission(i)));
}
}
// TODO(yoz): OAuth issue advice?