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

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

Issue 536753003: Add recommended extension installation support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-3
Patch Set: rebase Created 6 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_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 443f5eefeb54ee5c2500148ead8f83282dc7362d..78fe67acccc4fef698b066e1709e080cc171e7e8 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -687,6 +687,7 @@ bool ExtensionService::UninstallExtension(
// Callers should not send us nonexistent extensions.
CHECK(extension.get());
+ ManagementPolicy* by_policy = system_->management_policy();
// Policy change which triggers an uninstall will always set
// |external_uninstall| to true so this is the only way to uninstall
// managed extensions.
@@ -704,8 +705,7 @@ bool ExtensionService::UninstallExtension(
(reason == extensions::UNINSTALL_REASON_SYNC &&
extension->was_installed_by_custodian());
if (!external_uninstall &&
- !system_->management_policy()->UserMayModifySettings(
- extension.get(), error)) {
+ by_policy->MustRemainInstalled(extension.get(), error)) {
content::NotificationService::current()->Notify(
extensions::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED,
content::Source<Profile>(profile_),

Powered by Google App Engine
This is Rietveld 408576698