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

Unified Diff: chrome/browser/chromeos/login/auth/online_attempt_host.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/online_attempt_host.cc
diff --git a/chrome/browser/chromeos/login/auth/online_attempt_host.cc b/chrome/browser/chromeos/login/auth/online_attempt_host.cc
index 5c28c6741eb1734089ba6f3809087e88a94d1080..564b84b9a0b174f2fd1e49bd8692ee39315fc027 100644
--- a/chrome/browser/chromeos/login/auth/online_attempt_host.cc
+++ b/chrome/browser/chromeos/login/auth/online_attempt_host.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/chromeos/login/users/user.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_thread.h"
-#include "google_apis/gaia/gaia_auth_util.h"
namespace chromeos {
@@ -32,17 +31,12 @@ void OnlineAttemptHost::Check(Profile* profile,
current_attempt_hash_ = attempt_hash;
current_username_ = user_context.GetUserID();
- state_.reset(
- new AuthAttemptState(
- UserContext(gaia::CanonicalizeEmail(user_context.GetUserID()),
- user_context.GetPassword(),
- user_context.GetAuthCode()),
- std::string(), // login_token
- std::string(), // login_captcha
- User::USER_TYPE_REGULAR,
- false)); // user_is_new.
- online_attempt_.reset(new OnlineAttempt(state_.get(),
- this));
+ state_.reset(new AuthAttemptState(user_context,
+ User::USER_TYPE_REGULAR,
+ false, // unlock
+ false, // online_complete
+ false)); // user_is_new
+ online_attempt_.reset(new OnlineAttempt(state_.get(), this));
online_attempt_->Initiate(profile);
}
}

Powered by Google App Engine
This is Rietveld 408576698