| 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/signin/signin_manager.h" | 5 #include "chrome/browser/signin/signin_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 #endif | 275 #endif |
| 276 } | 276 } |
| 277 | 277 |
| 278 void SigninManager::ProvideSecondFactorAccessCode( | 278 void SigninManager::ProvideSecondFactorAccessCode( |
| 279 const std::string& access_code) { | 279 const std::string& access_code) { |
| 280 DCHECK(!possibly_invalid_username_.empty() && !password_.empty() && | 280 DCHECK(!possibly_invalid_username_.empty() && !password_.empty() && |
| 281 last_result_.data.empty()); | 281 last_result_.data.empty()); |
| 282 DCHECK(type_ == SIGNIN_TYPE_CLIENT_LOGIN); | 282 DCHECK(type_ == SIGNIN_TYPE_CLIENT_LOGIN); |
| 283 | 283 |
| 284 NotifyDiagnosticsObservers(SIGNIN_TYPE, |
| 285 SigninTypeToString(SIGNIN_TYPE_CLIENT_LOGIN) |
| 286 + "(with two factor authentication)"); |
| 287 |
| 284 client_login_.reset(new GaiaAuthFetcher(this, | 288 client_login_.reset(new GaiaAuthFetcher(this, |
| 285 GaiaConstants::kChromeSource, | 289 GaiaConstants::kChromeSource, |
| 286 profile_->GetRequestContext())); | 290 profile_->GetRequestContext())); |
| 287 client_login_->StartClientLogin(possibly_invalid_username_, | 291 client_login_->StartClientLogin(possibly_invalid_username_, |
| 288 access_code, | 292 access_code, |
| 289 "", | 293 "", |
| 290 std::string(), | 294 std::string(), |
| 291 std::string(), | 295 std::string(), |
| 292 GaiaAuthFetcher::HostedAccountsNotAllowed); | 296 GaiaAuthFetcher::HostedAccountsNotAllowed); |
| 293 } | 297 } |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 NotifySigninValueChanged(field, value)); | 630 NotifySigninValueChanged(field, value)); |
| 627 } | 631 } |
| 628 | 632 |
| 629 void SigninManager::NotifyDiagnosticsObservers( | 633 void SigninManager::NotifyDiagnosticsObservers( |
| 630 const TimedSigninStatusField& field, | 634 const TimedSigninStatusField& field, |
| 631 const std::string& value) { | 635 const std::string& value) { |
| 632 FOR_EACH_OBSERVER(SigninDiagnosticsObserver, | 636 FOR_EACH_OBSERVER(SigninDiagnosticsObserver, |
| 633 signin_diagnostics_observers_, | 637 signin_diagnostics_observers_, |
| 634 NotifySigninValueChanged(field, value)); | 638 NotifySigninValueChanged(field, value)); |
| 635 } | 639 } |
| OLD | NEW |