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

Unified Diff: chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc

Issue 903453002: Policy: check MustRemainInstalled in addition to UserMayModifySettings before offering uninstall (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/views/apps/app_info_dialog/app_info_footer_panel.cc
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
index 84112a38277a47a9714a38216329e1a59369ffb8..733f20dc1d34a7076e8404524c67fc06deecb99a 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_footer_panel.cc
@@ -184,7 +184,8 @@ void AppInfoFooterPanel::UninstallApp() {
}
bool AppInfoFooterPanel::CanUninstallApp() const {
- return extensions::ExtensionSystem::Get(profile_)
- ->management_policy()
- ->UserMayModifySettings(app_, NULL);
+ extensions::ManagementPolicy* policy =
+ extensions::ExtensionSystem::Get(profile_)->management_policy();
+ return policy->UserMayModifySettings(app_, nullptr) &&
+ !policy->MustRemainInstalled(app_, nullptr);
}
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model.cc ('k') | extensions/browser/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698