Index: sync/engine/net/server_connection_manager.cc |
diff --git a/sync/engine/net/server_connection_manager.cc b/sync/engine/net/server_connection_manager.cc |
index 3101109a4fe86458a3008c3fe2f4c2db26592e9b..2531c97bb972f345d06ed25649fd0660803a7f2c 100644 |
--- a/sync/engine/net/server_connection_manager.cc |
+++ b/sync/engine/net/server_connection_manager.cc |
@@ -163,17 +163,6 @@ int ServerConnectionManager::Connection::ReadResponse(string* out_buffer, |
return bytes_read; |
} |
-ScopedServerStatusWatcher::ScopedServerStatusWatcher( |
- ServerConnectionManager* conn_mgr, HttpResponse* response) |
- : conn_mgr_(conn_mgr), |
- response_(response) { |
- response->server_status = conn_mgr->server_status_; |
-} |
- |
-ScopedServerStatusWatcher::~ScopedServerStatusWatcher() { |
- conn_mgr_->SetServerStatus(response_->server_status); |
-} |
- |
ServerConnectionManager::ServerConnectionManager( |
const string& server, |
int port, |
@@ -273,18 +262,19 @@ void ServerConnectionManager::NotifyStatusChanged() { |
} |
bool ServerConnectionManager::PostBufferWithCachedAuth( |
- PostBufferParams* params, ScopedServerStatusWatcher* watcher) { |
+ PostBufferParams* params) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
string path = |
MakeSyncServerPath(proto_sync_path(), MakeSyncQueryString(client_id_)); |
- return PostBufferToPath(params, path, auth_token(), watcher); |
+ bool result = PostBufferToPath(params, path, auth_token()); |
+ SetServerStatus(params->response.server_status); |
+ return result; |
} |
bool ServerConnectionManager::PostBufferToPath(PostBufferParams* params, |
- const string& path, const string& auth_token, |
- ScopedServerStatusWatcher* watcher) { |
+ const string& path, |
+ const string& auth_token) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- DCHECK(watcher != NULL); |
// TODO(pavely): crbug.com/273096. Check for "credentials_lost" is added as |
// workaround for M29 blocker to avoid sending RPC to sync with known invalid |
@@ -364,8 +354,7 @@ void ServerConnectionManager::RemoveListener( |
listeners_.RemoveObserver(listener); |
} |
-ServerConnectionManager::Connection* ServerConnectionManager::MakeConnection() |
-{ |
+ServerConnectionManager::Connection* ServerConnectionManager::MakeConnection() { |
return NULL; // For testing. |
} |