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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 863063002: Don't allow profile deletion in Metro mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: js nits Created 5 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options_profile_list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 2dbfc5d0d5b7bee16236aa53c61d34a34429146d..cb1f3521a07dac88d6f9c8c888b4552678d87424 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -350,6 +350,8 @@ cr.define('options', function() {
};
if (loadTimeData.getBoolean('profileIsSupervised')) {
$('profiles-create').disabled = true;
+ }
+ if (!loadTimeData.getBoolean('allowProfileDeletion')) {
$('profiles-delete').disabled = true;
$('profiles-list').canDeleteItems = false;
}
@@ -1406,14 +1408,13 @@ cr.define('options', function() {
var selectedProfile = profilesList.selectedItem;
var hasSelection = selectedProfile != null;
var hasSingleProfile = profilesList.dataModel.length == 1;
- var isSupervised = loadTimeData.getBoolean('profileIsSupervised');
$('profiles-manage').disabled = !hasSelection ||
!selectedProfile.isCurrentProfile;
if (hasSelection && !selectedProfile.isCurrentProfile)
$('profiles-manage').title = loadTimeData.getString('currentUserOnly');
else
$('profiles-manage').title = '';
- $('profiles-delete').disabled = isSupervised ||
+ $('profiles-delete').disabled = !profilesList.canDeleteItems ||
(!hasSelection && !hasSingleProfile);
if (OptionsPage.isSettingsApp()) {
$('profiles-app-list-switch').disabled = !hasSelection ||
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options_profile_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698