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

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

Issue 467363003: Guest mode causes certain settings to be hidden. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index d938e469aa6e2ba438bb1ed16df8f11a018424c9..8263eed4c3bef9e691464ce7434bbbb3af71c88c 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -212,6 +212,18 @@ cr.define('options', function() {
};
}
+ if (loadTimeData.getBoolean('profileIsGuest')) {
Evan Stade 2014/08/19 17:49:13 I think a somewhat cleaner approach would be to ad
Mike Lerman 2014/08/19 20:34:12 I've always taken the approach the "logic" should
Evan Stade 2014/08/19 20:41:15 Visibility is a style, imo, and overall I think CS
+ if ($('appearance-section')) {
+ $('appearance-section').hidden = true;
+ }
+ if ($('startup-section')) {
+ $('startup-section').hidden = true;
+ }
+ if ($('searchBox')) {
+ $('searchBox').hidden = true;
+ }
+ }
+
$('themes-gallery').onclick = function(event) {
window.open(loadTimeData.getString('themesGalleryURL'));
chrome.send('coreOptionsUserMetricsAction',
@@ -643,8 +655,10 @@ cr.define('options', function() {
$('reset-profile-settings').onclick = function(event) {
PageManager.showPageByName('resetProfileSettings');
};
+ // The Reset Profile Settings feature makes no sense for an off-the-record
+ // profile (e.g. in Guest mode on Chrome OS), so hide it.
$('reset-profile-settings-section').hidden =
- !loadTimeData.getBoolean('enableResetProfileSettings');
+ loadTimeData.getBoolean('profileIsGuest');
// Extension controlled UI.
this.addExtensionControlledBox_('search-section-content',

Powered by Google App Engine
This is Rietveld 408576698