| 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/common/net/gaia/gaia_auth_fetcher.h" | 5 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 return GoogleServiceAuthError( | 354 return GoogleServiceAuthError( |
| 355 GoogleServiceAuthError::SERVICE_UNAVAILABLE); | 355 GoogleServiceAuthError::SERVICE_UNAVAILABLE); |
| 356 } | 356 } |
| 357 | 357 |
| 358 LOG(WARNING) << "Incomprehensible response from Google Accounts servers."; | 358 LOG(WARNING) << "Incomprehensible response from Google Accounts servers."; |
| 359 return GoogleServiceAuthError( | 359 return GoogleServiceAuthError( |
| 360 GoogleServiceAuthError::SERVICE_UNAVAILABLE); | 360 GoogleServiceAuthError::SERVICE_UNAVAILABLE); |
| 361 } | 361 } |
| 362 | 362 |
| 363 NOTREACHED(); | 363 NOTREACHED(); |
| 364 return GoogleServiceAuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE); |
| 364 } | 365 } |
| 365 | 366 |
| 366 void GaiaAuthFetcher::OnClientLoginFetched(const std::string& data, | 367 void GaiaAuthFetcher::OnClientLoginFetched(const std::string& data, |
| 367 const URLRequestStatus& status, | 368 const URLRequestStatus& status, |
| 368 int response_code) { | 369 int response_code) { |
| 369 | 370 |
| 370 if (status.is_success() && response_code == RC_REQUEST_OK) { | 371 if (status.is_success() && response_code == RC_REQUEST_OK) { |
| 371 VLOG(1) << "ClientLogin successful!"; | 372 VLOG(1) << "ClientLogin successful!"; |
| 372 std::string sid; | 373 std::string sid; |
| 373 std::string lsid; | 374 std::string lsid; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 NOTREACHED(); | 436 NOTREACHED(); |
| 436 } | 437 } |
| 437 } | 438 } |
| 438 | 439 |
| 439 // static | 440 // static |
| 440 bool GaiaAuthFetcher::IsSecondFactorSuccess( | 441 bool GaiaAuthFetcher::IsSecondFactorSuccess( |
| 441 const std::string& alleged_error) { | 442 const std::string& alleged_error) { |
| 442 return alleged_error.find(kSecondFactor) != | 443 return alleged_error.find(kSecondFactor) != |
| 443 std::string::npos; | 444 std::string::npos; |
| 444 } | 445 } |
| OLD | NEW |