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

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

Issue 15715005: Remove passphrase dialog and last parts of elevation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 7 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
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
deleted file mode 100644
index b7a210e31493d97145cdc6bee71941eb5669b739..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/managed_user_passphrase_dialog.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2013 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() {
- var checkPassphrase = function(event) {
- chrome.send('checkPassphrase', [$('passphrase-entry').value]);
- };
- var closeDialog = function(event) {
- // TODO(akuegel): Replace by closeDialog.
- chrome.send('DialogClose');
- };
- // Directly set the focus on the input box so the user can start typing right
- // away.
- $('passphrase-entry').focus();
- $('unlock-passphrase-button').onclick = checkPassphrase;
- $('cancel-passphrase-button').onclick = closeDialog;
- $('passphrase-entry').oninput = function(event) {
- $('unlock-passphrase-button').disabled = $('passphrase-entry').value == '';
- $('incorrect-passphrase-warning').hidden = true;
- };
- $('passphrase-entry').onkeypress = function(event) {
- // Check if the user pressed enter.
- if (event.keyCode == 13)
- checkPassphrase(event);
- };
-
- // Pressing escape anywhere in the frame should work.
- document.onkeyup = function(event) {
- // Check if the user pressed escape.
- if (event.keyCode == 27)
- closeDialog(event);
- };
-}
-
-function passphraseResult(passphraseCorrect) {
- if (passphraseCorrect) {
- chrome.send('DialogClose', ['true']);
- } else {
- $('incorrect-passphrase-warning').hidden = false;
- $('passphrase-entry').focus();
- }
-}
-
-window.addEventListener('DOMContentLoaded', load);
« no previous file with comments | « chrome/browser/resources/managed_user_passphrase_dialog.html ('k') | chrome/browser/ui/webui/managed_user_passphrase_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698