| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/chromeos/login/online_attempt.h" | 5 #include "chrome/browser/chromeos/login/online_attempt.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 gaia_authenticator_.reset( | 47 gaia_authenticator_.reset( |
| 48 new GaiaAuthenticator2(this, | 48 new GaiaAuthenticator2(this, |
| 49 GaiaConstants::kChromeOSSource, | 49 GaiaConstants::kChromeOSSource, |
| 50 profile->GetRequestContext())); | 50 profile->GetRequestContext())); |
| 51 TryClientLogin(); | 51 TryClientLogin(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void OnlineAttempt::OnClientLoginSuccess( | 54 void OnlineAttempt::OnClientLoginSuccess( |
| 55 const GaiaAuthConsumer::ClientLoginResult& credentials) { | 55 const GaiaAuthConsumer::ClientLoginResult& credentials) { |
| 56 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 56 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 57 LOG(INFO) << "Online login successful!"; | 57 VLOG(1) << "Online login successful!"; |
| 58 if (fetch_canceler_) { | 58 if (fetch_canceler_) { |
| 59 fetch_canceler_->Cancel(); | 59 fetch_canceler_->Cancel(); |
| 60 fetch_canceler_ = NULL; | 60 fetch_canceler_ = NULL; |
| 61 } | 61 } |
| 62 | 62 |
| 63 TriggerResolve(credentials, LoginFailure::None()); | 63 TriggerResolve(credentials, LoginFailure::None()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void OnlineAttempt::OnClientLoginFailure( | 66 void OnlineAttempt::OnClientLoginFailure( |
| 67 const GoogleServiceAuthError& error) { | 67 const GoogleServiceAuthError& error) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 void OnlineAttempt::TriggerResolve( | 122 void OnlineAttempt::TriggerResolve( |
| 123 const GaiaAuthConsumer::ClientLoginResult& credentials, | 123 const GaiaAuthConsumer::ClientLoginResult& credentials, |
| 124 const LoginFailure& outcome) { | 124 const LoginFailure& outcome) { |
| 125 attempt_->RecordOnlineLoginStatus(credentials, outcome); | 125 attempt_->RecordOnlineLoginStatus(credentials, outcome); |
| 126 gaia_authenticator_.reset(NULL); | 126 gaia_authenticator_.reset(NULL); |
| 127 resolver_->Resolve(); | 127 resolver_->Resolve(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace chromeos | 130 } // namespace chromeos |
| OLD | NEW |