OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/chromeos/login/test_attempt_state.h" |
| 6 |
| 7 #include <string> |
| 8 |
| 9 #include "chrome/common/net/gaia/gaia_auth_consumer.h" |
| 10 #include "cros/chromeos_cryptohome.h" |
| 11 |
| 12 namespace chromeos { |
| 13 |
| 14 TestAttemptState::TestAttemptState(const std::string& username, |
| 15 const std::string& password, |
| 16 const std::string& ascii_hash, |
| 17 const std::string& login_token, |
| 18 const std::string& login_captcha) |
| 19 : AuthAttemptState(username, |
| 20 password, |
| 21 ascii_hash, |
| 22 login_token, |
| 23 login_captcha) { |
| 24 } |
| 25 |
| 26 TestAttemptState::~TestAttemptState() {} |
| 27 |
| 28 void TestAttemptState::PresetOnlineLoginStatus( |
| 29 const GaiaAuthConsumer::ClientLoginResult& credentials, |
| 30 const LoginFailure& outcome) { |
| 31 online_complete_ = true; |
| 32 online_outcome_ = outcome; |
| 33 credentials_ = credentials; |
| 34 } |
| 35 |
| 36 void TestAttemptState::PresetOfflineLoginStatus(bool offline_outcome, |
| 37 int offline_code) { |
| 38 offline_complete_ = true; |
| 39 offline_outcome_ = offline_outcome; |
| 40 offline_code_ = offline_code; |
| 41 } |
| 42 |
| 43 } // namespace chromeos |
OLD | NEW |