Index: chrome/browser/chromeos/login/screen_locker.cc |
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc |
index d002223409cc1e7705d7fff0d0c1cfce53a21e4e..caa3cfd9be8ff62b247fd5eb2bcd8c3891a7c42c 100644 |
--- a/chrome/browser/chromeos/login/screen_locker.cc |
+++ b/chrome/browser/chromeos/login/screen_locker.cc |
@@ -182,13 +182,12 @@ void ScreenLocker::OnLoginFailure(const LoginFailure& error) { |
} |
void ScreenLocker::OnLoginSuccess( |
- const std::string& username, |
- const std::string& password, |
+ const UserCredentials& credentials, |
bool pending_requests, |
bool using_oauth) { |
incorrect_passwords_count_ = 0; |
if (authentication_start_time_.is_null()) { |
- if (!username.empty()) |
+ if (!credentials.username.empty()) |
LOG(ERROR) << "Start time is not set at authentication success"; |
} else { |
base::TimeDelta delta = base::Time::Now() - authentication_start_time_; |
@@ -197,14 +196,14 @@ void ScreenLocker::OnLoginSuccess( |
} |
Profile* profile = ProfileManager::GetDefaultProfile(); |
- if (profile && !password.empty()) { |
+ if (profile && !credentials.password.empty()) { |
// We have a non-empty password, so notify listeners (such as the sync |
// engine). |
SigninManager* signin = SigninManagerFactory::GetForProfile(profile); |
DCHECK(signin); |
GoogleServiceSigninSuccessDetails details( |
signin->GetAuthenticatedUsername(), |
- password); |
+ credentials.password); |
content::NotificationService::current()->Notify( |
chrome::NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL, |
content::Source<Profile>(profile), |
@@ -212,7 +211,7 @@ void ScreenLocker::OnLoginSuccess( |
} |
authentication_capture_.reset(new AuthenticationParametersCapture()); |
- authentication_capture_->username = username; |
+ authentication_capture_->username = credentials.username; |
authentication_capture_->pending_requests = pending_requests; |
authentication_capture_->using_oauth = using_oauth; |
@@ -244,8 +243,9 @@ void ScreenLocker::UnlockOnLoginSuccess() { |
if (login_status_consumer_) { |
login_status_consumer_->OnLoginSuccess( |
- authentication_capture_->username, |
- std::string(), |
+ UserCredentials(authentication_capture_->username, |
+ std::string(), // password |
+ std::string()), // auth_code |
authentication_capture_->pending_requests, |
authentication_capture_->using_oauth); |
} |
@@ -263,13 +263,17 @@ void ScreenLocker::Authenticate(const string16& password) { |
if (LoginPerformer::default_performer()) { |
DVLOG(1) << "Delegating authentication to LoginPerformer."; |
LoginPerformer::default_performer()->PerformLogin( |
- user_.email(), UTF16ToUTF8(password), |
+ UserCredentials(user_.email(), |
+ UTF16ToUTF8(password), |
+ std::string()), // auth_code |
LoginPerformer::AUTH_MODE_INTERNAL); |
} else { |
BrowserThread::PostTask( |
BrowserThread::UI, FROM_HERE, |
base::Bind(&Authenticator::AuthenticateToUnlock, authenticator_.get(), |
- user_.email(), UTF16ToUTF8(password))); |
+ UserCredentials(user_.email(), |
+ UTF16ToUTF8(password), |
+ std::string()))); // auth_code |
} |
} |