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

Side by Side Diff: sync/internal_api/syncapi_server_connection_manager_unittest.cc

Issue 1339943003: Revert "Report data usage UMA for Chrome services" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/internal_api/syncapi_server_connection_manager.h" 5 #include "sync/internal_api/syncapi_server_connection_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 return std::string(); 44 return std::string();
45 } 45 }
46 void Abort() override { wait_for_abort_.Signal(); } 46 void Abort() override { wait_for_abort_.Signal(); }
47 private: 47 private:
48 base::WaitableEvent wait_for_abort_; 48 base::WaitableEvent wait_for_abort_;
49 }; 49 };
50 50
51 class BlockingHttpPostFactory : public HttpPostProviderFactory { 51 class BlockingHttpPostFactory : public HttpPostProviderFactory {
52 public: 52 public:
53 ~BlockingHttpPostFactory() override {} 53 ~BlockingHttpPostFactory() override {}
54 void Init(const std::string& user_agent, 54 void Init(const std::string& user_agent) override {}
55 const BindToTrackerCallback& bind_to_tracker_callback) override {}
56
57 HttpPostProviderInterface* Create() override { 55 HttpPostProviderInterface* Create() override {
58 return new BlockingHttpPost(); 56 return new BlockingHttpPost();
59 } 57 }
60 void Destroy(HttpPostProviderInterface* http) override { 58 void Destroy(HttpPostProviderInterface* http) override {
61 delete static_cast<BlockingHttpPost*>(http); 59 delete static_cast<BlockingHttpPost*>(http);
62 } 60 }
63 }; 61 };
64 62
65 } // namespace 63 } // namespace
66 64
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 bool result = server.PostBufferToPath( 118 bool result = server.PostBufferToPath(
121 &params, "/testpath", "testauth", &watcher); 119 &params, "/testpath", "testauth", &watcher);
122 120
123 EXPECT_FALSE(result); 121 EXPECT_FALSE(result);
124 EXPECT_EQ(HttpResponse::CONNECTION_UNAVAILABLE, 122 EXPECT_EQ(HttpResponse::CONNECTION_UNAVAILABLE,
125 params.response.server_status); 123 params.response.server_status);
126 abort_thread.Stop(); 124 abort_thread.Stop();
127 } 125 }
128 126
129 } // namespace syncer 127 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | sync/test/fake_server/fake_server_http_post_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698