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

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

Issue 6480039: chrome://settings - Provide method for pages to prevent themselves being shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment update Created 9 years, 10 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
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 930be56c278c62d5c2657d5f9d01db97779c9422..8775ec0ca8ced98f51eb343f9e71f44fae4fa001 100644
--- a/chrome/browser/resources/options/personal_options.js
+++ b/chrome/browser/resources/options/personal_options.js
@@ -80,8 +80,9 @@ cr.define('options', function() {
if (cr.commandLine.options['--bwsi']) {
// Disable the screen lock checkbox for the guest mode.
$('enable-screen-lock').disabled = true;
+ }
- // Disable passwords management settings for the guest mode.
+ if (PersonalOptions.disablePasswordManagement()) {
$('passwords-offersave').disabled = true;
$('passwords-neversave').disabled = true;
$('passwords-offersave').value = false;
@@ -184,6 +185,15 @@ cr.define('options', function() {
},
};
+ /**
+ * Returns whether the user should be able to manage (view and edit) their
+ * stored passwords. Password management is disabled in guest mode.
+ * @return {boolean} True if password management should be disabled.
+ */
+ PersonalOptions.disablePasswordManagement = function() {
+ return cr.commandLine.options['--bwsi'];
+ };
+
// Forward public APIs to private implementations.
[
'setSyncEnabled',

Powered by Google App Engine
This is Rietveld 408576698