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

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

Issue 2396903002: Supervised Users always need custodian approval for permission increase (Closed)
Patch Set: Created 4 years, 2 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
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;
}
« no previous file with comments | « chrome/browser/extensions/api/webstore_private/webstore_private_api.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698