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..85e1676c72a06479a74993cf9e2b87b158819081 100644 |
| --- a/chrome/browser/resources/options2/browser_options.js |
| +++ b/chrome/browser/resources/options2/browser_options.js |
| @@ -87,6 +87,14 @@ cr.define('options', function() { |
| $('themes-reset').onclick = function(event) { |
| chrome.send('themesReset'); |
| }; |
| + if (cr.isChromeOS) { |
| + if (AccountsOptions.loggedInAsGuest()) { |
| + AccountsOptions.disableElementsForGuest( |
| + $('toolbar-show-home-button-group')); |
| + AccountsOptions.disableElementsForGuest( |
| + $('bookmarkbar-show-on-all-tabs-group')); |
| + } |
| + } |
| // Device section (ChromeOS only). |
| if (cr.isChromeOS) { |
| @@ -103,6 +111,11 @@ cr.define('options', function() { |
| } |
| // Search section. |
| + if (cr.isChromeOS) { |
| + if (AccountsOptions.loggedInAsGuest()) |
|
James Hawkins
2012/02/28 20:03:35
Move this 'if' logic up.
Denis Kuznetsov (DE-MUC)
2012/02/29 08:41:43
Done.
|
| + AccountsOptions.disableElementsForGuest($('instant-setting')); |
| + } |
| + |
| $('manage-default-search-engines').onclick = function(event) { |
| OptionsPage.navigateToPage('searchEngines'); |
| chrome.send('coreOptionsUserMetricsAction', |
| @@ -172,6 +185,9 @@ cr.define('options', function() { |
| }; |
| if (cr.isChromeOS) { |
| + if (AccountsOptions.loggedInAsGuest()) |
| + $('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,11 +197,9 @@ 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; |
| + if (AccountsOptions.loggedInAsGuest()) { |
|
James Hawkins
2012/02/28 20:03:35
Move this block up to the top.
Denis Kuznetsov (DE-MUC)
2012/02/29 08:41:43
Done.
|
| + // Disable the screen lock checkbox in guest mode. |
| + AccountsOptions.disableElementsForGuest($('enable-screen-lock')); |
| // Hide the startup section in Guest mode. |
| $('startup-section').hidden = true; |