Chromium Code Reviews| 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 280f7afe1c5758715b8ccb198af6bcc9da619c81..007982f606eafd2875185d9a96a0a6f1ed0034f8 100644 |
| --- a/chrome/browser/resources/options2/browser_options.js |
| +++ b/chrome/browser/resources/options2/browser_options.js |
| @@ -87,6 +87,17 @@ cr.define('options', function() { |
| $('themes-reset').onclick = function(event) { |
| chrome.send('themesReset'); |
| }; |
| + if (cr.isChromeOS) { |
| + // // Appearance section. |
|
csilv
2012/03/01 01:32:18
nit, extra //
Perhaps we should combine the if bl
Denis Kuznetsov (DE-MUC)
2012/03/01 14:21:54
Done.
I like the idea that all code is grouped ju
|
| + if (AccountsOptions.loggedInAsGuest()) { |
| + AccountsOptions.disableElementsForGuest( |
| + $('toolbar-show-home-button-group')); |
| + AccountsOptions.disableElementsForGuest( |
| + $('bookmarkbar-show-on-all-tabs-group')); |
| + // Search section |
| + AccountsOptions.disableElementsForGuest($('instant-setting')); |
| + } |
| + } |
| // Device section (ChromeOS only). |
| if (cr.isChromeOS) { |
| @@ -172,6 +183,15 @@ cr.define('options', function() { |
| }; |
| if (cr.isChromeOS) { |
| + if (AccountsOptions.loggedInAsGuest()) { |
| + // Disable the screen lock checkbox in guest mode. |
| + AccountsOptions.disableElementsForGuest($('enable-screen-lock')); |
| + |
| + // Hide the startup and users sections in Guest mode. |
| + $('startup-section').hidden = true; |
| + $('users-section').hidden = true; |
| + } |
| + |
| // Username (canonical email) of the currently logged in user or |
| // |kGuestUser| if a guest session is active. |
| this.username_ = localStrings.getString('username'); |
| @@ -181,16 +201,6 @@ cr.define('options', function() { |
| }; |
| this.updateAccountPicture_(); |
| - if (cr.commandLine && cr.commandLine.options['--bwsi']) { |
| - // Disable the screen lock checkbox and change-picture-button in |
| - // guest mode. |
| - $('enable-screen-lock').disabled = true; |
| - $('change-picture-button').disabled = true; |
| - |
| - // Hide the startup section in Guest mode. |
| - $('startup-section').hidden = true; |
| - } |
| - |
| $('manage-accounts-button').onclick = function(event) { |
| OptionsPage.navigateToPage('accounts'); |
| chrome.send('coreOptionsUserMetricsAction', |