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; |