Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: chrome/browser/sync/engine/syncapi.cc

Issue 455038: Give the proper error message in the case where you attempt to log int... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698