| Index: chrome/browser/resources/options2/advanced_options.js
|
| diff --git a/chrome/browser/resources/options2/advanced_options.js b/chrome/browser/resources/options2/advanced_options.js
|
| index d3e712ac45ce18bdd29c972b064707dc588788eb..931af1b0a69fe233783448651daca18feb514bd5 100644
|
| --- a/chrome/browser/resources/options2/advanced_options.js
|
| +++ b/chrome/browser/resources/options2/advanced_options.js
|
| @@ -34,8 +34,8 @@ cr.define('options', function() {
|
| // Date and time section (CrOS only).
|
| if (cr.isChromeOS && AccountsOptions.loggedInAsGuest()) {
|
| // Disable time-related settings if we're not logged in as a real user.
|
| - $('timezone-select').disabled = true;
|
| - $('use-24hour-clock').disabled = true;
|
| + AccountsOptions.disableElementsForGuest($('timezone-select'));
|
| + AccountsOptions.disableElementsForGuest($('use-24hour-clock'));
|
| }
|
|
|
| // Privacy section.
|
| @@ -57,6 +57,12 @@ cr.define('options', function() {
|
| [String(event.target.checked)]);
|
| };
|
| }
|
| + if (cr.isChromeOS && AccountsOptions.loggedInAsGuest()) {
|
| + AccountsOptions.disableElementsForGuest(
|
| + $('search-suggest-enabled-group'));
|
| + AccountsOptions.disableElementsForGuest(
|
| + $('dns-prefetching-enabled-group'));
|
| + }
|
|
|
| // Bluetooth (CrOS only).
|
| if (cr.isChromeOS) {
|
| @@ -106,7 +112,7 @@ cr.define('options', function() {
|
| chrome.send('coreOptionsUserMetricsAction',
|
| ['Options_ShowPasswordManager']);
|
| };
|
| - if (AdvancedOptions.GuestModeActive()) {
|
| + if (cr.isChromeOS && AccountsOptions.loggedInAsGuest()) {
|
| // Disable and turn off Autofill in guest mode.
|
| var autofillEnabled = $('autofill-enabled');
|
| autofillEnabled.disabled = true;
|
| @@ -122,9 +128,10 @@ cr.define('options', function() {
|
| $('manage-passwords').disabled = true;
|
|
|
| // Hide the entire section on ChromeOS
|
| - if (cr.isChromeOS)
|
| - $('passwords-and-autofill-section').hidden = true;
|
| + AccountsOptions.disableElementsForGuest(
|
| + $('passwords-and-autofill-section'));
|
| }
|
| +
|
| $('mac-passwords-warning').hidden =
|
| !(localStrings.getString('macPasswordsWarning'));
|
|
|
| @@ -260,15 +267,6 @@ cr.define('options', function() {
|
| }
|
| };
|
|
|
| - /**
|
| - * Returns whether the browser in guest mode. Some features are disabled or
|
| - * hidden in guest mode.
|
| - * @return {boolean} True if guest mode is currently active.
|
| - */
|
| - AdvancedOptions.GuestModeActive = function() {
|
| - return cr.commandLine && cr.commandLine.options['--bwsi'];
|
| - };
|
| -
|
| // Set the font size selected item.
|
| AdvancedOptions.SetFontSize = function(font_size_value) {
|
| var selectCtl = $('defaultFontSize');
|
|
|