| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/auth/parallel_authenticator.h" | 5 #include "chrome/browser/chromeos/login/auth/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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 void ParallelAuthenticator::AuthenticateToLogin( | 240 void ParallelAuthenticator::AuthenticateToLogin( |
| 241 Profile* profile, | 241 Profile* profile, |
| 242 const UserContext& user_context) { | 242 const UserContext& user_context) { |
| 243 authentication_profile_ = profile; | 243 authentication_profile_ = profile; |
| 244 current_state_.reset(new AuthAttemptState( | 244 current_state_.reset(new AuthAttemptState( |
| 245 user_context, | 245 user_context, |
| 246 user_manager::USER_TYPE_REGULAR, | 246 user_manager::USER_TYPE_REGULAR, |
| 247 false, // unlock | 247 false, // unlock |
| 248 false, // online_complete | 248 false, // online_complete |
| 249 !UserManager::Get()->IsKnownUser(user_context.GetUserID()))); | 249 !GetUserManager()->IsKnownUser(user_context.GetUserID()))); |
| 250 // Reset the verified flag. | 250 // Reset the verified flag. |
| 251 owner_is_verified_ = false; | 251 owner_is_verified_ = false; |
| 252 | 252 |
| 253 SystemSaltGetter::Get()->GetSystemSalt( | 253 SystemSaltGetter::Get()->GetSystemSalt( |
| 254 base::Bind(&Mount, | 254 base::Bind(&Mount, |
| 255 current_state_.get(), | 255 current_state_.get(), |
| 256 scoped_refptr<ParallelAuthenticator>(this), | 256 scoped_refptr<ParallelAuthenticator>(this), |
| 257 cryptohome::MOUNT_FLAGS_NONE)); | 257 cryptohome::MOUNT_FLAGS_NONE)); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void ParallelAuthenticator::CompleteLogin(Profile* profile, | 260 void ParallelAuthenticator::CompleteLogin(Profile* profile, |
| 261 const UserContext& user_context) { | 261 const UserContext& user_context) { |
| 262 authentication_profile_ = profile; | 262 authentication_profile_ = profile; |
| 263 current_state_.reset(new AuthAttemptState( | 263 current_state_.reset(new AuthAttemptState( |
| 264 user_context, | 264 user_context, |
| 265 user_manager::USER_TYPE_REGULAR, | 265 user_manager::USER_TYPE_REGULAR, |
| 266 true, // unlock | 266 true, // unlock |
| 267 false, // online_complete | 267 false, // online_complete |
| 268 !UserManager::Get()->IsKnownUser(user_context.GetUserID()))); | 268 !GetUserManager()->IsKnownUser(user_context.GetUserID()))); |
| 269 | 269 |
| 270 // Reset the verified flag. | 270 // Reset the verified flag. |
| 271 owner_is_verified_ = false; | 271 owner_is_verified_ = false; |
| 272 | 272 |
| 273 SystemSaltGetter::Get()->GetSystemSalt( | 273 SystemSaltGetter::Get()->GetSystemSalt( |
| 274 base::Bind(&Mount, | 274 base::Bind(&Mount, |
| 275 current_state_.get(), | 275 current_state_.get(), |
| 276 scoped_refptr<ParallelAuthenticator>(this), | 276 scoped_refptr<ParallelAuthenticator>(this), |
| 277 cryptohome::MOUNT_FLAGS_NONE)); | 277 cryptohome::MOUNT_FLAGS_NONE)); |
| 278 | 278 |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 Resolve(); | 814 Resolve(); |
| 815 } | 815 } |
| 816 | 816 |
| 817 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, | 817 void ParallelAuthenticator::SetOwnerState(bool owner_check_finished, |
| 818 bool check_result) { | 818 bool check_result) { |
| 819 owner_is_verified_ = owner_check_finished; | 819 owner_is_verified_ = owner_check_finished; |
| 820 user_can_login_ = check_result; | 820 user_can_login_ = check_result; |
| 821 } | 821 } |
| 822 | 822 |
| 823 } // namespace chromeos | 823 } // namespace chromeos |
| OLD | NEW |