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

Side by Side Diff: chrome/browser/resources/options/managed_user_set_passphrase.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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 cr.define('options', function() {
6 /** @const */ var OptionsPage = options.OptionsPage;
7
8 //////////////////////////////////////////////////////////////////////////////
9 // ManagedUserSetPassphraseOverlay class:
10
11 /**
12 * Encapsulated handling of XXX.
Bernhard Bauer 2013/01/07 14:20:22 Wait, that does not sound right ;-)
13 * @constructor
14 */
15 function ManagedUserSetPassphraseOverlay() {
16 //this.activeNavTab = null;
Bernhard Bauer 2013/01/07 14:20:22 Please remove.
17 OptionsPage.call(
18 this,
19 'setPassphrase',
20 loadTimeData.getString('setPassphraseTitle'),
21 'managed-user-set-passphrase-overlay');
22 }
23
24 cr.addSingletonGetter(ManagedUserSetPassphraseOverlay);
25
26 ManagedUserSetPassphraseOverlay.prototype = {
27 __proto__: OptionsPage.prototype,
28
29 initializePage: function() {
30 OptionsPage.prototype.initializePage.call(this);
31 $('save-passphrase').onclick = function() {
32 if ($('passphrase-foo').value != $('passphrase-confirm').value) {
33 alert('passwords are not equal');
34 // TODO display proper error message here
Bernhard Bauer 2013/01/07 14:20:22 Format TODOs as TODO(ldap), to make it easier to g
Pam (message me for reviews) 2013/01/07 14:51:49 With a colon after the userid; i.e., TODO(akuegel
35 return;
36 }
37 if ($('passphrase-foo').value == '') {
38 alert('password should not be empty');
39 // TODO display proper error message here
40 return;
41 }
42 chrome.send('setPassphrase', [$('passphrase-foo').value]);
Pam (message me for reviews) 2013/01/07 14:51:49 Is chrome.send sufficiently robust to be sending a
Bernhard Bauer 2013/01/08 17:43:14 FWIW, sync also sends the passphrase in plaintext
Pam (message me for reviews) 2013/01/14 15:37:50 Fair enough, then.
43 $('passphrase-foo').value = '';
44 $('passphrase-confirm').value = '';
45 OptionsPage.closeOverlay();
46 };
47 },
48 };
49
50 // Export
51 return {
52 ManagedUserSetPassphraseOverlay: ManagedUserSetPassphraseOverlay
53 };
54
55 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698