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

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: Style issue fixes 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..4450773561d6d447035688d1b8f199d81107ae9e
--- /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) {
+ if ($('passphrase_entry').value == '') {
+ return;
+ }
+ chrome.send('checkPassphrase', [$('passphrase_entry').value]);
+ $('passphrase_entry').value = '';
+ }
+ $('cancel_passphrase_button').onclick = function(event) {
+ chrome.send('DialogClose');
+ }
+}
+
+function passphraseCorrect() {
+ chrome.send('DialogClose', ['correct']);
+}
+
+function passphraseIncorrect() {
+ $('incorrect_passphrase_warning').style.visibility = 'visible';
+}
+
+// Add handlers to HTML elements.
+window.addEventListener('DOMContentLoaded', load);

Powered by Google App Engine
This is Rietveld 408576698