| 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/test_attempt_state.h" | 5 #include "chromeos/login/auth/test_attempt_state.h" |
| 6 | 6 |
| 7 #include "components/user_manager/user_type.h" | 7 #include "components/user_manager/user_type.h" |
| 8 #include "google_apis/gaia/gaia_auth_consumer.h" | 8 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 TestAttemptState::TestAttemptState(const UserContext& credentials, | 12 TestAttemptState::TestAttemptState(const UserContext& credentials, |
| 13 const bool user_is_new) | 13 const bool user_is_new) |
| 14 : AuthAttemptState(credentials, | 14 : AuthAttemptState(credentials, |
| 15 user_manager::USER_TYPE_REGULAR, | 15 user_manager::USER_TYPE_REGULAR, |
| 16 false, // unlock | 16 false, // unlock |
| 17 false, // online_complete | 17 false, // online_complete |
| 18 user_is_new) { | 18 user_is_new) { |
| 19 } | 19 } |
| 20 | 20 |
| 21 TestAttemptState::~TestAttemptState() {} | 21 TestAttemptState::~TestAttemptState() { |
| 22 } |
| 22 | 23 |
| 23 void TestAttemptState::PresetOnlineLoginStatus(const AuthFailure& outcome) { | 24 void TestAttemptState::PresetOnlineLoginStatus(const AuthFailure& outcome) { |
| 24 online_complete_ = true; | 25 online_complete_ = true; |
| 25 online_outcome_ = outcome; | 26 online_outcome_ = outcome; |
| 26 } | 27 } |
| 27 | 28 |
| 28 void TestAttemptState::DisableHosted() { | 29 void TestAttemptState::DisableHosted() { |
| 29 hosted_policy_ = GaiaAuthFetcher::HostedAccountsNotAllowed; | 30 hosted_policy_ = GaiaAuthFetcher::HostedAccountsNotAllowed; |
| 30 } | 31 } |
| 31 | 32 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 59 | 60 |
| 60 bool TestAttemptState::cryptohome_outcome() { | 61 bool TestAttemptState::cryptohome_outcome() { |
| 61 return cryptohome_outcome_; | 62 return cryptohome_outcome_; |
| 62 } | 63 } |
| 63 | 64 |
| 64 cryptohome::MountError TestAttemptState::cryptohome_code() { | 65 cryptohome::MountError TestAttemptState::cryptohome_code() { |
| 65 return cryptohome_code_; | 66 return cryptohome_code_; |
| 66 } | 67 } |
| 67 | 68 |
| 68 } // namespace chromeos | 69 } // namespace chromeos |
| OLD | NEW |