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

Side by Side Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 145073003: Indicate which authentication flow was used in UserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speculative fix for telemetry. Created 6 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
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 #include "chrome/browser/chromeos/login/screen_locker.h" 5 #include "chrome/browser/chromeos/login/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 "authentication success."; 254 "authentication success.";
255 return; 255 return;
256 } 256 }
257 257
258 if (login_status_consumer_) { 258 if (login_status_consumer_) {
259 login_status_consumer_->OnLoginSuccess( 259 login_status_consumer_->OnLoginSuccess(
260 UserContext(authentication_capture_->user_context.username, 260 UserContext(authentication_capture_->user_context.username,
261 authentication_capture_->user_context.password, 261 authentication_capture_->user_context.password,
262 authentication_capture_->user_context.auth_code, 262 authentication_capture_->user_context.auth_code,
263 authentication_capture_->user_context.username_hash, 263 authentication_capture_->user_context.username_hash,
264 authentication_capture_->user_context.using_oauth)); 264 authentication_capture_->user_context.using_oauth,
265 authentication_capture_->user_context.auth_flow));
265 } 266 }
266 authentication_capture_.reset(); 267 authentication_capture_.reset();
267 weak_factory_.InvalidateWeakPtrs(); 268 weak_factory_.InvalidateWeakPtrs();
268 269
269 VLOG(1) << "Hiding the lock screen."; 270 VLOG(1) << "Hiding the lock screen.";
270 chromeos::ScreenLocker::Hide(); 271 chromeos::ScreenLocker::Hide();
271 } 272 }
272 273
273 void ScreenLocker::Authenticate(const UserContext& user_context) { 274 void ScreenLocker::Authenticate(const UserContext& user_context) {
274 LOG_ASSERT(IsUserLoggedIn(user_context.username)) 275 LOG_ASSERT(IsUserLoggedIn(user_context.username))
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 469
469 bool ScreenLocker::IsUserLoggedIn(const std::string& username) { 470 bool ScreenLocker::IsUserLoggedIn(const std::string& username) {
470 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) { 471 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) {
471 if ((*it)->email() == username) 472 if ((*it)->email() == username)
472 return true; 473 return true;
473 } 474 }
474 return false; 475 return false;
475 } 476 }
476 477
477 } // namespace chromeos 478 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/parallel_authenticator_unittest.cc ('k') | chrome/browser/chromeos/login/user.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698