summaryrefslogtreecommitdiffstats
path: root/sync/internal_api
diff options
context:
space:
mode:
authorpavely <pavely@chromium.org>2015-12-07 18:35:50 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-08 02:36:44 +0000
commitea4e35e99416f2dc84bda02d9b9a4b5e617317cd (patch)
tree12f79b1cf8643d41cc36bcf36e66ca4faabbff39 /sync/internal_api
parent6ba4c1e61a03cba5dfd7a53da70437aa61583a7f (diff)
downloadchromium_src-ea4e35e99416f2dc84bda02d9b9a4b5e617317cd.zip
chromium_src-ea4e35e99416f2dc84bda02d9b9a4b5e617317cd.tar.gz
chromium_src-ea4e35e99416f2dc84bda02d9b9a4b5e617317cd.tar.bz2
[Sync] Remove ScopedServerStatusWatcher
Also deprecate a few error types that are not returned from server. Without this class it is more clear how server_status gets from HttpResponse to ServerConnectionManager's server_status. R=zea@chromium.org,timonvo@chromium.org BUG=567273 Review URL: https://codereview.chromium.org/1505953002 Cr-Commit-Position: refs/heads/master@{#363713}
Diffstat (limited to 'sync/internal_api')
-rw-r--r--sync/internal_api/syncapi_server_connection_manager_unittest.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/sync/internal_api/syncapi_server_connection_manager_unittest.cc b/sync/internal_api/syncapi_server_connection_manager_unittest.cc
index e438ac1..208b3a2 100644
--- a/sync/internal_api/syncapi_server_connection_manager_unittest.cc
+++ b/sync/internal_api/syncapi_server_connection_manager_unittest.cc
@@ -72,10 +72,8 @@ TEST(SyncAPIServerConnectionManagerTest, VeryEarlyAbortPost) {
"server", 0, true, new BlockingHttpPostFactory(), &signal);
ServerConnectionManager::PostBufferParams params;
- ScopedServerStatusWatcher watcher(&server, &params.response);
- bool result = server.PostBufferToPath(
- &params, "/testpath", "testauth", &watcher);
+ bool result = server.PostBufferToPath(&params, "/testpath", "testauth");
EXPECT_FALSE(result);
EXPECT_EQ(HttpResponse::CONNECTION_UNAVAILABLE,
@@ -89,11 +87,9 @@ TEST(SyncAPIServerConnectionManagerTest, EarlyAbortPost) {
"server", 0, true, new BlockingHttpPostFactory(), &signal);
ServerConnectionManager::PostBufferParams params;
- ScopedServerStatusWatcher watcher(&server, &params.response);
signal.Signal();
- bool result = server.PostBufferToPath(
- &params, "/testpath", "testauth", &watcher);
+ bool result = server.PostBufferToPath(&params, "/testpath", "testauth");
EXPECT_FALSE(result);
EXPECT_EQ(HttpResponse::CONNECTION_UNAVAILABLE,
@@ -107,7 +103,6 @@ TEST(SyncAPIServerConnectionManagerTest, AbortPost) {
"server", 0, true, new BlockingHttpPostFactory(), &signal);
ServerConnectionManager::PostBufferParams params;
- ScopedServerStatusWatcher watcher(&server, &params.response);
base::Thread abort_thread("Test_AbortThread");
ASSERT_TRUE(abort_thread.Start());
@@ -117,8 +112,7 @@ TEST(SyncAPIServerConnectionManagerTest, AbortPost) {
base::Unretained(&signal)),
TestTimeouts::tiny_timeout());
- bool result = server.PostBufferToPath(
- &params, "/testpath", "testauth", &watcher);
+ bool result = server.PostBufferToPath(&params, "/testpath", "testauth");
EXPECT_FALSE(result);
EXPECT_EQ(HttpResponse::CONNECTION_UNAVAILABLE,