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

Unified Diff: chrome/browser/chromeos/login/auth/auth_attempt_state.cc

Issue 290483003: Tame the proliferation of UserContext constructors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/auth/auth_attempt_state.cc
diff --git a/chrome/browser/chromeos/login/auth/auth_attempt_state.cc b/chrome/browser/chromeos/login/auth/auth_attempt_state.cc
index 8803e94977e75699ca0c5e32d7dda1b27b27496d..316e7e4d276a481cd92cd635d069ce706faff5cd 100644
--- a/chrome/browser/chromeos/login/auth/auth_attempt_state.cc
+++ b/chrome/browser/chromeos/login/auth/auth_attempt_state.cc
@@ -15,17 +15,16 @@ using content::BrowserThread;
namespace chromeos {
AuthAttemptState::AuthAttemptState(const UserContext& user_context,
- const std::string& login_token,
- const std::string& login_captcha,
- const User::UserType user_type,
- const bool user_is_new)
+ User::UserType user_type,
+ bool unlock,
+ bool online_complete,
+ bool user_is_new)
: user_context(user_context),
- login_token(login_token),
- login_captcha(login_captcha),
user_type(user_type),
- unlock(false),
- online_complete_(false),
- online_outcome_(LoginFailure::NONE),
+ unlock(unlock),
+ online_complete_(online_complete),
+ online_outcome_(online_complete ? LoginFailure::UNLOCK_FAILED :
+ LoginFailure::NONE),
hosted_policy_(GaiaAuthFetcher::HostedAccountsAllowed),
is_first_time_user_(user_is_new),
cryptohome_complete_(false),
@@ -35,36 +34,6 @@ AuthAttemptState::AuthAttemptState(const UserContext& user_context,
username_hash_valid_(true) {
}
-AuthAttemptState::AuthAttemptState(const std::string& username,
- const std::string& password)
- : user_context(username, password, ""),
- user_type(User::USER_TYPE_REGULAR),
- unlock(true),
- online_complete_(true),
- online_outcome_(LoginFailure::UNLOCK_FAILED),
- hosted_policy_(GaiaAuthFetcher::HostedAccountsAllowed),
- is_first_time_user_(false),
- cryptohome_complete_(false),
- cryptohome_outcome_(false),
- cryptohome_code_(cryptohome::MOUNT_ERROR_NONE),
- username_hash_obtained_(true) {
-}
-
-AuthAttemptState::AuthAttemptState(const UserContext& user_context,
- const bool user_is_new)
- : user_context(user_context),
- user_type(User::USER_TYPE_REGULAR),
- unlock(true),
- online_complete_(false),
- online_outcome_(LoginFailure::NONE),
- hosted_policy_(GaiaAuthFetcher::HostedAccountsAllowed),
- is_first_time_user_(user_is_new),
- cryptohome_complete_(false),
- cryptohome_outcome_(false),
- cryptohome_code_(cryptohome::MOUNT_ERROR_NONE),
- username_hash_obtained_(true) {
-}
-
AuthAttemptState::~AuthAttemptState() {}
void AuthAttemptState::RecordOnlineLoginStatus(
« no previous file with comments | « chrome/browser/chromeos/login/auth/auth_attempt_state.h ('k') | chrome/browser/chromeos/login/auth/extended_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698