Chromium Code Reviews| Index: chrome/browser/extensions/extension_disabled_ui.cc |
| diff --git a/chrome/browser/extensions/extension_disabled_ui.cc b/chrome/browser/extensions/extension_disabled_ui.cc |
| index 885fc5df26e5eace51143b79028c3e9e6d843d87..17751cfb72d05932604846123b91eb3b1e35372d 100644 |
| --- a/chrome/browser/extensions/extension_disabled_ui.cc |
| +++ b/chrome/browser/extensions/extension_disabled_ui.cc |
| @@ -319,9 +319,7 @@ ExtensionDisabledGlobalError::GetBubbleViewMessages() { |
| base::string16 ExtensionDisabledGlobalError::GetBubbleViewAcceptButtonLabel() { |
| if (extensions::util::IsExtensionSupervised(extension_, |
| - service_->profile()) && |
| - extensions::util::NeedCustodianApprovalForPermissionIncrease( |
| - service_->profile())) { |
| + service_->profile())) { |
| // TODO(treib): Probably use a new string here once we get UX design. |
| // For now, just use "OK". crbug.com/461261 |
| return l10n_util::GetStringUTF16(IDS_OK); |
| @@ -338,16 +336,9 @@ base::string16 ExtensionDisabledGlobalError::GetBubbleViewAcceptButtonLabel() { |
| base::string16 ExtensionDisabledGlobalError::GetBubbleViewCancelButtonLabel() { |
| if (extensions::util::IsExtensionSupervised(extension_, |
| service_->profile())) { |
| - if (extensions::util::NeedCustodianApprovalForPermissionIncrease( |
| - service_->profile())) { |
| - // If the supervised user can't approve the update, then there is no |
| - // "cancel" button. |
| - return base::string16(); |
| - } else { |
| - // Supervised users can not remove extensions, so use "cancel" here |
| - // instead of "uninstall". |
| - return l10n_util::GetStringUTF16(IDS_CANCEL); |
| - } |
| + // The supervised user can't approve the update, and hence there is no |
| + // "cancel" button. |
| + return base::string16(); |
| } |
| return l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL); |
| } |
| @@ -358,9 +349,7 @@ void ExtensionDisabledGlobalError::OnBubbleViewDidClose(Browser* browser) { |
| void ExtensionDisabledGlobalError::BubbleViewAcceptButtonPressed( |
| Browser* browser) { |
| if (extensions::util::IsExtensionSupervised(extension_, |
| - service_->profile()) && |
| - extensions::util::NeedCustodianApprovalForPermissionIncrease( |
| - service_->profile())) { |
| + service_->profile())) { |
| return; |
| } |
| // Delay extension reenabling so this bubble closes properly. |
| @@ -377,8 +366,6 @@ void ExtensionDisabledGlobalError::BubbleViewCancelButtonPressed( |
| // For custodian-installed extensions, this button should only exist if the |
| // supervised user can approve the update. Otherwise there is only an "OK" |
| // button. |
|
Marc Treib
2016/10/05 19:48:04
Now this whole "if" should never happen (you essen
|
| - DCHECK(!extensions::util::NeedCustodianApprovalForPermissionIncrease( |
| - service_->profile())); |
| // Supervised users may never remove custodian-installed extensions. |
| return; |
| } |