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

Unified Diff: chrome/browser/chromeos/login/online_attempt_host.cc

Issue 12704002: Support for auth code based authentication flow for both app and web UI driven flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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/online_attempt_host.cc
diff --git a/chrome/browser/chromeos/login/online_attempt_host.cc b/chrome/browser/chromeos/login/online_attempt_host.cc
index 7c21186aea3f05c09c3706838028482c1198c124..801c8f447e71e91132f0c385cf8f112ebbf59447 100644
--- a/chrome/browser/chromeos/login/online_attempt_host.cc
+++ b/chrome/browser/chromeos/login/online_attempt_host.cc
@@ -24,24 +24,25 @@ OnlineAttemptHost::~OnlineAttemptHost() {
}
void OnlineAttemptHost::Check(Profile* profile,
- const std::string& username,
- const std::string& password) {
+ const UserCredentials& credentials) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- std::string attempt_hash = base::SHA1HashString(username + "\n" + password);
+ std::string attempt_hash = base::SHA1HashString(
+ credentials.username + "\n" + credentials.password);
if (attempt_hash != current_attempt_hash_) {
Reset();
current_attempt_hash_ = attempt_hash;
- current_username_ = username;
+ current_username_ = credentials.username;
state_.reset(
new AuthAttemptState(
- gaia::CanonicalizeEmail(username),
- password,
- std::string(),
- std::string(),
- std::string(),
+ UserCredentials(gaia::CanonicalizeEmail(credentials.username),
+ credentials.password,
+ credentials.auth_code),
+ std::string(), // ascii_hash
+ std::string(), // login_token
+ std::string(), // login_captcha
User::USER_TYPE_REGULAR,
- false)); // Isn't a new user.
+ 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