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

Unified Diff: chrome/browser/ui/extensions/extension_enable_flow.cc

Issue 925563002: Supervised users: Slightly relax restrictions around extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test_ext_install_disable
Patch Set: benwells review 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
Index: chrome/browser/ui/extensions/extension_enable_flow.cc
diff --git a/chrome/browser/ui/extensions/extension_enable_flow.cc b/chrome/browser/ui/extensions/extension_enable_flow.cc
index 8e305e7931f2e8d5f8ca71187691b3ccf6e5c91c..948e52aa55c45e4f06d071dfbe97aa0fb61b70d7 100644
--- a/chrome/browser/ui/extensions/extension_enable_flow.cc
+++ b/chrome/browser/ui/extensions/extension_enable_flow.cc
@@ -87,6 +87,12 @@ void ExtensionEnableFlow::CheckPermissionAndMaybePromptUser() {
return;
}
+ // Supervised users can't re-enable custodian-installed extensions.
+ if (profile_->IsSupervised() && extension->was_installed_by_custodian()) {
benwells 2015/02/25 03:23:32 Nit: You should use your cool new function here to
Marc Treib 2015/02/25 09:48:55 Done.
+ delegate_->ExtensionEnableFlowAborted(false); // |delegate_| may delete us.
+ return;
+ }
+
extensions::ExtensionPrefs* prefs = extensions::ExtensionPrefs::Get(profile_);
if (!prefs->DidExtensionEscalatePermissions(extension_id_)) {
// Enable the extension immediately if its privileges weren't escalated.

Powered by Google App Engine
This is Rietveld 408576698