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..9b0cd7f8c1de6000ada5c47e7fd74348baef1758 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,16 @@ cr.define('options', function() { |
$('passwords-neversave').value = true; |
$('manage-passwords').disabled = true; |
} |
+ |
+ if (PersonalOptions.disableAutofillManagement()) { |
+ $('autofill-settings').disabled = true; |
+ |
+ // Disable and turn off autofill. |
+ var autofillEnabled = $('autofill-enabled'); |
+ autofillEnabled.disabled = true; |
+ autofillEnabled.checked = false; |
+ cr.dispatchSimpleEvent(autofillEnabled, 'change'); |
+ } |
}, |
showStopSyncingOverlay_: function() { |
@@ -214,6 +226,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', |