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

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: fixes addressing #3 Created 6 years, 3 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 68ccff85756291343bbaf1af8a1f5f7d2a38fdfb..af19c0caece79ec0566071b3dcb6d9c05c42053e 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.
@@ -703,8 +704,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