| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 9 #include "base/bind.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 131 | 131 | 
| 132 void OnlineAttempt::TryClientLogin() { | 132 void OnlineAttempt::TryClientLogin() { | 
| 133   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 133   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 
| 134 | 134 | 
| 135   BrowserThread::PostDelayedTask( | 135   BrowserThread::PostDelayedTask( | 
| 136       BrowserThread::UI, FROM_HERE, | 136       BrowserThread::UI, FROM_HERE, | 
| 137       base::Bind(&OnlineAttempt::CancelClientLogin, weak_factory_.GetWeakPtr()), | 137       base::Bind(&OnlineAttempt::CancelClientLogin, weak_factory_.GetWeakPtr()), | 
| 138       base::TimeDelta::FromMilliseconds(kClientLoginTimeoutMs)); | 138       base::TimeDelta::FromMilliseconds(kClientLoginTimeoutMs)); | 
| 139 | 139 | 
| 140   client_fetcher_->StartClientLogin( | 140   client_fetcher_->StartClientLogin( | 
| 141       attempt_->username, | 141       attempt_->credentials.username, | 
| 142       attempt_->password, | 142       attempt_->credentials.password, | 
| 143       GaiaConstants::kSyncService, | 143       GaiaConstants::kSyncService, | 
| 144       attempt_->login_token, | 144       attempt_->login_token, | 
| 145       attempt_->login_captcha, | 145       attempt_->login_captcha, | 
| 146       attempt_->hosted_policy()); | 146       attempt_->hosted_policy()); | 
| 147 } | 147 } | 
| 148 | 148 | 
| 149 bool OnlineAttempt::HasPendingFetch() { | 149 bool OnlineAttempt::HasPendingFetch() { | 
| 150   return client_fetcher_->HasPendingFetch(); | 150   return client_fetcher_->HasPendingFetch(); | 
| 151 } | 151 } | 
| 152 | 152 | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 165 } | 165 } | 
| 166 | 166 | 
| 167 void OnlineAttempt::TriggerResolve( | 167 void OnlineAttempt::TriggerResolve( | 
| 168     const LoginFailure& outcome) { | 168     const LoginFailure& outcome) { | 
| 169   attempt_->RecordOnlineLoginStatus(outcome); | 169   attempt_->RecordOnlineLoginStatus(outcome); | 
| 170   client_fetcher_.reset(NULL); | 170   client_fetcher_.reset(NULL); | 
| 171   resolver_->Resolve(); | 171   resolver_->Resolve(); | 
| 172 } | 172 } | 
| 173 | 173 | 
| 174 }  // namespace chromeos | 174 }  // namespace chromeos | 
| OLD | NEW | 
|---|