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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_password_changed.js

Issue 1114543002: UMA to track the reason for re-auth (draft). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fixes. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Password changed screen implementation. 6 * @fileoverview Password changed screen implementation.
7 */ 7 */
8 8
9 login.createScreen('PasswordChangedScreen', 'password-changed', function() { 9 login.createScreen('PasswordChangedScreen', 'password-changed', function() {
10 return { 10 return {
(...skipping 27 matching lines...) Expand all
38 screen.classList.add('resync'); 38 screen.classList.add('resync');
39 $('password-changed-proceed-button').focus(); 39 $('password-changed-proceed-button').focus();
40 $('password-changed').classList.remove('password-error'); 40 $('password-changed').classList.remove('password-error');
41 $('old-password').value = ''; 41 $('old-password').value = '';
42 $('password-changed-ok-button').disabled = true; 42 $('password-changed-ok-button').disabled = true;
43 } 43 }
44 }); 44 });
45 45
46 var gaiaPasswordChanged = $('gaia-password-changed'); 46 var gaiaPasswordChanged = $('gaia-password-changed');
47 gaiaPasswordChanged.addEventListener('cancel', function(e) { 47 gaiaPasswordChanged.addEventListener('cancel', function(e) {
48 chrome.send('cancelPasswordChangedFlow'); 48 chrome.send('cancelPasswordChangedFlow',
49 [$('gaia-password-changed').email]);
49 gaiaPasswordChanged.reset(); 50 gaiaPasswordChanged.reset();
50 }); 51 });
51 52
52 gaiaPasswordChanged.addEventListener('passwordEnter', function(e) { 53 gaiaPasswordChanged.addEventListener('passwordEnter', function(e) {
53 chrome.send('migrateUserData', [e.detail.password]); 54 chrome.send('migrateUserData', [e.detail.password]);
54 }); 55 });
55 56
56 gaiaPasswordChanged.addEventListener('proceedAnyway', function() { 57 gaiaPasswordChanged.addEventListener('proceedAnyway', function() {
57 chrome.send('resyncUserData'); 58 chrome.send('resyncUserData');
58 }); 59 });
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 136
136 get isNewGaiaFlow() { 137 get isNewGaiaFlow() {
137 return document.querySelector('.new-gaia-flow') != undefined; 138 return document.querySelector('.new-gaia-flow') != undefined;
138 }, 139 },
139 140
140 /** 141 /**
141 * Cancels password migration and drops the user back to the login screen. 142 * Cancels password migration and drops the user back to the login screen.
142 */ 143 */
143 cancel: function() { 144 cancel: function() {
144 this.disabled = true; 145 this.disabled = true;
145 chrome.send('cancelPasswordChangedFlow'); 146 chrome.send('cancelPasswordChangedFlow', ['']);
146 }, 147 },
147 148
148 /** 149 /**
149 * Starts migration process using old password that user provided. 150 * Starts migration process using old password that user provided.
150 */ 151 */
151 migrate: function() { 152 migrate: function() {
152 if (!$('old-password').value) { 153 if (!$('old-password').value) {
153 $('old-password').focus(); 154 $('old-password').focus();
154 return; 155 return;
155 } 156 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // It assumes session is about to start so hides login screen controls. 205 // It assumes session is about to start so hides login screen controls.
205 Oobe.getInstance().headerHidden = false; 206 Oobe.getInstance().headerHidden = false;
206 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED}); 207 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED});
207 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.PASSWORD_CHANGED; 208 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.PASSWORD_CHANGED;
208 if (!this.isNewGaiaFlow) 209 if (!this.isNewGaiaFlow)
209 $('password-changed-ok-button').disabled = true; 210 $('password-changed-ok-button').disabled = true;
210 } 211 }
211 }; 212 };
212 }); 213 });
213 214
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698