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

Unified Diff: chrome/browser/sync/engine/net/server_connection_manager.cc

Issue 7563017: Dont retry sync in case of auth errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/engine/net/server_connection_manager.cc
diff --git a/chrome/browser/sync/engine/net/server_connection_manager.cc b/chrome/browser/sync/engine/net/server_connection_manager.cc
index ef45722356214e13efaa43e0d4727027c32292d4..be4b6b22b7392ce054f2270ddd54a0fc3def09f4 100644
--- a/chrome/browser/sync/engine/net/server_connection_manager.cc
+++ b/chrome/browser/sync/engine/net/server_connection_manager.cc
@@ -192,11 +192,21 @@ bool ServerConnectionManager::PostBufferToPath(const PostBufferParams* params,
const string& path, const string& auth_token,
ScopedServerStatusWatcher* watcher) {
DCHECK(watcher != NULL);
+
+ if (auth_token.empty()) {
tim (not reviewing) 2011/08/04 00:24:40 could we put all this in syncapi_server_connection
lipalani1 2011/08/04 01:14:33 CheckTime uses that code and we probably dont want
+ params->response->server_status = HttpResponse::SYNC_AUTH_ERROR;
+ return false;
+ }
+
scoped_ptr<Post> post(MakePost());
post->set_timing_info(params->timing_info);
bool ok = post->Init(path.c_str(), auth_token, params->buffer_in,
params->response);
+ if (params->response->server_status == HttpResponse::SYNC_AUTH_ERROR) {
+ reset_auth_token();
+ }
+
if (!ok || RC_REQUEST_OK != params->response->response_code) {
IncrementErrorCount();
return false;

Powered by Google App Engine
This is Rietveld 408576698