| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_AUTH_ATTEMPT_STATE_H_ | 5 #ifndef CHROMEOS_LOGIN_AUTH_AUTH_ATTEMPT_STATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_AUTH_ATTEMPT_STATE_H_ | 6 #define CHROMEOS_LOGIN_AUTH_AUTH_ATTEMPT_STATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chromeos/chromeos_export.h" |
| 10 #include "chromeos/login/auth/auth_status_consumer.h" | 11 #include "chromeos/login/auth/auth_status_consumer.h" |
| 11 #include "chromeos/login/auth/user_context.h" | 12 #include "chromeos/login/auth/user_context.h" |
| 12 #include "components/user_manager/user_type.h" | 13 #include "components/user_manager/user_type.h" |
| 13 #include "google_apis/gaia/gaia_auth_consumer.h" | 14 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 14 #include "google_apis/gaia/gaia_auth_fetcher.h" | 15 #include "google_apis/gaia/gaia_auth_fetcher.h" |
| 15 #include "third_party/cros_system_api/dbus/service_constants.h" | 16 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 16 | 17 |
| 17 namespace chromeos { | 18 namespace chromeos { |
| 18 | 19 |
| 19 // Tracks the state associated with a single attempt to log in to chromium OS. | 20 // Tracks the state associated with a single attempt to log in to chromium OS. |
| 20 // Enforces that methods are only called on the UI thread. | 21 // Enforces that methods are only called on the UI thread. |
| 21 class AuthAttemptState { | 22 class CHROMEOS_EXPORT AuthAttemptState { |
| 22 public: | 23 public: |
| 23 // Used to initialize for a login attempt. | 24 // Used to initialize for a login attempt. |
| 24 AuthAttemptState(const UserContext& user_context, | 25 AuthAttemptState(const UserContext& user_context, |
| 25 user_manager::UserType user_type, | 26 user_manager::UserType user_type, |
| 26 bool unlock, | 27 bool unlock, |
| 27 bool online_complete, | 28 bool online_complete, |
| 28 bool user_is_new); | 29 bool user_is_new); |
| 29 | 30 |
| 30 virtual ~AuthAttemptState(); | 31 virtual ~AuthAttemptState(); |
| 31 | 32 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 108 |
| 108 // After the username hash request is completed, this marks whether | 109 // After the username hash request is completed, this marks whether |
| 109 // the request was successful. | 110 // the request was successful. |
| 110 bool username_hash_valid_; | 111 bool username_hash_valid_; |
| 111 | 112 |
| 112 DISALLOW_COPY_AND_ASSIGN(AuthAttemptState); | 113 DISALLOW_COPY_AND_ASSIGN(AuthAttemptState); |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace chromeos | 116 } // namespace chromeos |
| 116 | 117 |
| 117 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_AUTH_ATTEMPT_STATE_H_ | 118 #endif // CHROMEOS_LOGIN_AUTH_AUTH_ATTEMPT_STATE_H_ |
| OLD | NEW |