Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/sync/engine/syncapi.h" | 5 #include "chrome/browser/sync/engine/syncapi.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1428 case AuthWatcherEvent::GAIA_AUTH_FAILED: // Invalid GAIA credentials. | 1428 case AuthWatcherEvent::GAIA_AUTH_FAILED: // Invalid GAIA credentials. |
| 1429 if (event.auth_results->auth_error == browser_sync::CaptchaRequired) { | 1429 if (event.auth_results->auth_error == browser_sync::CaptchaRequired) { |
| 1430 auth_problem_ = AuthError::CAPTCHA_REQUIRED; | 1430 auth_problem_ = AuthError::CAPTCHA_REQUIRED; |
| 1431 std::string url_string("http://www.google.com/accounts/"); | 1431 std::string url_string("http://www.google.com/accounts/"); |
| 1432 url_string += event.auth_results->captcha_url; | 1432 url_string += event.auth_results->captcha_url; |
| 1433 GURL captcha(url_string); | 1433 GURL captcha(url_string); |
| 1434 observer_->OnAuthError(AuthError::FromCaptchaChallenge( | 1434 observer_->OnAuthError(AuthError::FromCaptchaChallenge( |
| 1435 event.auth_results->captcha_token, captcha, | 1435 event.auth_results->captcha_token, captcha, |
| 1436 GURL(event.auth_results->auth_error_url))); | 1436 GURL(event.auth_results->auth_error_url))); |
| 1437 return; | 1437 return; |
| 1438 } else if (event.auth_results->auth_error == | |
| 1439 browser_sync::ConnectionUnavailable) { | |
|
tim (not reviewing)
2009/12/10 19:29:49
ultranit - I never know what the style guide says
| |
| 1440 auth_problem_ = AuthError::CONNECTION_FAILED; | |
| 1441 } else { | |
| 1442 auth_problem_ = AuthError::INVALID_GAIA_CREDENTIALS; | |
| 1438 } | 1443 } |
| 1444 break; | |
| 1439 case AuthWatcherEvent::SERVICE_AUTH_FAILED: // Expired GAIA credentials. | 1445 case AuthWatcherEvent::SERVICE_AUTH_FAILED: // Expired GAIA credentials. |
| 1440 auth_problem_ = AuthError::INVALID_GAIA_CREDENTIALS; | 1446 auth_problem_ = AuthError::INVALID_GAIA_CREDENTIALS; |
| 1441 break; | 1447 break; |
| 1442 case AuthWatcherEvent::SERVICE_USER_NOT_SIGNED_UP: | 1448 case AuthWatcherEvent::SERVICE_USER_NOT_SIGNED_UP: |
| 1443 auth_problem_ = AuthError::USER_NOT_SIGNED_UP; | 1449 auth_problem_ = AuthError::USER_NOT_SIGNED_UP; |
| 1444 break; | 1450 break; |
| 1445 case AuthWatcherEvent::SERVICE_CONNECTION_FAILED: | 1451 case AuthWatcherEvent::SERVICE_CONNECTION_FAILED: |
| 1446 auth_problem_ = AuthError::CONNECTION_FAILED; | 1452 auth_problem_ = AuthError::CONNECTION_FAILED; |
| 1447 break; | 1453 break; |
| 1448 default: // We don't care about the many other AuthWatcherEvent types. | 1454 default: // We don't care about the many other AuthWatcherEvent types. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1518 BaseTransaction::~BaseTransaction() { | 1524 BaseTransaction::~BaseTransaction() { |
| 1519 delete lookup_; | 1525 delete lookup_; |
| 1520 } | 1526 } |
| 1521 | 1527 |
| 1522 UserShare* SyncManager::GetUserShare() const { | 1528 UserShare* SyncManager::GetUserShare() const { |
| 1523 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 1529 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; |
| 1524 return data_->GetUserShare(); | 1530 return data_->GetUserShare(); |
| 1525 } | 1531 } |
| 1526 | 1532 |
| 1527 } // namespace sync_api | 1533 } // namespace sync_api |
| OLD | NEW |