| Index: chrome/browser/resources/options2/browser_options.js
|
| diff --git a/chrome/browser/resources/options2/browser_options.js b/chrome/browser/resources/options2/browser_options.js
|
| index 138a000ee994e5c6f44d4efb40f3f41198300556..7ac9c7f034e4ddf368d8f289cdb4bc4598fd26ce 100644
|
| --- a/chrome/browser/resources/options2/browser_options.js
|
| +++ b/chrome/browser/resources/options2/browser_options.js
|
| @@ -99,6 +99,17 @@ cr.define('options', function() {
|
| $('themes-reset').onclick = function(event) {
|
| chrome.send('themesReset');
|
| };
|
| + if (cr.isChromeOS) {
|
| + // Appearance section.
|
| + if (AccountsOptions.loggedInAsGuest()) {
|
| + AccountsOptions.disableElementsForGuest(
|
| + $('home-page-select-container'));
|
| + AccountsOptions.disableElementsForGuest(
|
| + $('bookmarkbar-show-on-all-tabs-group'));
|
| + // Search section
|
| + AccountsOptions.disableElementsForGuest($('instant-setting'));
|
| + }
|
| + }
|
|
|
| // Device section (ChromeOS only).
|
| if (cr.isChromeOS) {
|
| @@ -183,24 +194,25 @@ cr.define('options', function() {
|
| };
|
|
|
| if (cr.isChromeOS) {
|
| - // Username (canonical email) of the currently logged in user or
|
| - // |kGuestUser| if a guest session is active.
|
| - this.username_ = localStrings.getString('username');
|
| -
|
| - this.updateAccountPicture_();
|
| -
|
| - if (cr.commandLine && cr.commandLine.options['--bwsi']) {
|
| + if (AccountsOptions.loggedInAsGuest()) {
|
| // Disable the screen lock checkbox in guest mode.
|
| - $('enable-screen-lock').disabled = true;
|
| + AccountsOptions.disableElementsForGuest($('enable-screen-lock'));
|
|
|
| - // Hide the startup section in Guest mode.
|
| + // Hide the startup and users sections in Guest mode.
|
| $('startup-section').hidden = true;
|
| + $('users-section').hidden = true;
|
| } else {
|
| $('account-picture-wrapper').onclick = function(event) {
|
| OptionsPage.navigateToPage('changePicture');
|
| };
|
| }
|
|
|
| + // Username (canonical email) of the currently logged in user or
|
| + // |kGuestUser| if a guest session is active.
|
| + this.username_ = localStrings.getString('username');
|
| +
|
| + this.updateAccountPicture_();
|
| +
|
| $('manage-accounts-button').onclick = function(event) {
|
| OptionsPage.navigateToPage('accounts');
|
| chrome.send('coreOptionsUserMetricsAction',
|
|
|