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

Unified Diff: chrome/browser/resources/managed_user_passphrase_dialog.js

Issue 11783008: Add a lock to the managed user settings page and require authentication for unlocking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a check if the passphrase is set before closing the settings. Created 7 years, 11 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/managed_user_passphrase_dialog.js
diff --git a/chrome/browser/resources/managed_user_passphrase_dialog.js b/chrome/browser/resources/managed_user_passphrase_dialog.js
new file mode 100644
index 0000000000000000000000000000000000000000..e74fedc55c35d5c781736959cdc7ba586e0d3ebd
--- /dev/null
+++ b/chrome/browser/resources/managed_user_passphrase_dialog.js
@@ -0,0 +1,27 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function load() {
+ $('unlock-passphrase-button').onclick = function(event) {
+ chrome.send('checkPassphrase', [$('passphrase-entry').value]);
+ };
+ $('cancel-passphrase-button').onclick = function(event) {
+ chrome.send('DialogClose');
+ };
+ $('passphrase-entry').oninput = function(event) {
+ $('unlock-passphrase-button').disabled = $('passphrase-entry').value == '';
+ $('incorrect-passphrase-warning').hidden = true;
+ };
+}
+
+function passphraseCorrect() {
+ chrome.send('DialogClose', ['true']);
+}
+
+function passphraseIncorrect() {
+ $('incorrect-passphrase-warning').hidden = false;
+ $('passphrase-entry').focus();
+}
+
+window.addEventListener('DOMContentLoaded', load);

Powered by Google App Engine
This is Rietveld 408576698