Chromium Code Reviews| Index: chrome/browser/resources/options/personal_options.js |
| diff --git a/chrome/browser/resources/options/personal_options.js b/chrome/browser/resources/options/personal_options.js |
| index e900337602e218c54a86cc378f918a3702980836..f2b64549315753767cd10e3cd82cbda06eda3738 100644 |
| --- a/chrome/browser/resources/options/personal_options.js |
| +++ b/chrome/browser/resources/options/personal_options.js |
| @@ -78,11 +78,13 @@ cr.define('options', function() { |
| OptionsPage.navigateToPage('changePicture'); |
| }; |
| chrome.send('loadAccountPicture'); |
| - } |
| - if (cr.commandLine.options['--bwsi']) { |
| - // Disable the screen lock checkbox for the guest mode. |
| - $('enable-screen-lock').disabled = true; |
| + if (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 (PersonalOptions.disablePasswordManagement()) { |
| @@ -92,6 +94,15 @@ cr.define('options', function() { |
| $('passwords-neversave').value = true; |
| $('manage-passwords').disabled = true; |
| } |
| + |
| + if (PersonalOptions.disableAutofillManagement()) { |
| + $('autofill-enabled').disabled = true; |
|
achuithb
2011/05/20 23:38:01
Curious - is it better to cache the autofill-enabl
xiyuan
2011/05/20 23:52:39
I think you are right that use $() will incur a pe
|
| + $('autofill-settings').disabled = true; |
| + |
| + // Turn off autofill. |
| + $('autofill-enabled').checked = false; |
| + cr.dispatchSimpleEvent($('autofill-enabled'), 'change'); |
| + } |
| }, |
| showStopSyncingOverlay_: function() { |
| @@ -214,6 +225,14 @@ cr.define('options', function() { |
| return cr.commandLine.options['--bwsi']; |
| }; |
| + /** |
| + * Returns whether the user should be able to manage autofill settings. |
| + * @return {boolean} True if password management should be disabled. |
| + */ |
| + PersonalOptions.disableAutofillManagement = function() { |
| + return cr.commandLine.options['--bwsi']; |
| + }; |
| + |
| // Forward public APIs to private implementations. |
| [ |
| 'setSyncEnabled', |