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

Side by Side Diff: chrome/browser/chromeos/login/parallel_authenticator.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/parallel_authenticator.h" 5 #include "chrome/browser/chromeos/login/parallel_authenticator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 void ParallelAuthenticator::CompleteLogin(Profile* profile, 232 void ParallelAuthenticator::CompleteLogin(Profile* profile,
233 const UserContext& user_context) { 233 const UserContext& user_context) {
234 std::string canonicalized = gaia::CanonicalizeEmail(user_context.username); 234 std::string canonicalized = gaia::CanonicalizeEmail(user_context.username);
235 authentication_profile_ = profile; 235 authentication_profile_ = profile;
236 current_state_.reset( 236 current_state_.reset(
237 new AuthAttemptState( 237 new AuthAttemptState(
238 UserContext(canonicalized, 238 UserContext(canonicalized,
239 user_context.password, 239 user_context.password,
240 user_context.auth_code), 240 user_context.auth_code,
241 user_context.username_hash,
242 user_context.using_oauth,
243 user_context.auth_flow),
241 !UserManager::Get()->IsKnownUser(canonicalized))); 244 !UserManager::Get()->IsKnownUser(canonicalized)));
242 245
243 // Reset the verified flag. 246 // Reset the verified flag.
244 owner_is_verified_ = false; 247 owner_is_verified_ = false;
245 248
246 SystemSaltGetter::Get()->GetSystemSalt( 249 SystemSaltGetter::Get()->GetSystemSalt(
247 base::Bind(&Mount, 250 base::Bind(&Mount,
248 current_state_.get(), 251 current_state_.get(),
249 scoped_refptr<ParallelAuthenticator>(this), 252 scoped_refptr<ParallelAuthenticator>(this),
250 cryptohome::MOUNT_FLAGS_NONE)); 253 cryptohome::MOUNT_FLAGS_NONE));
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 Resolve(); 806 Resolve();
804 } 807 }
805 808
806 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, 809 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished,
807 bool check_result) { 810 bool check_result) {
808 owner_is_verified_ = owner_check_finished; 811 owner_is_verified_ = owner_check_finished;
809 user_can_login_ = check_result; 812 user_can_login_ = check_result;
810 } 813 }
811 814
812 } // namespace chromeos 815 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698