Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: chrome/browser/resources/options/personal_options.js

Issue 7057030: Disable and turn off autofill for guest mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the missing semicolon. :p Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/options/personal_options.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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',
« no previous file with comments | « chrome/browser/resources/options/personal_options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698