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

Unified Diff: sync/test/engine/mock_connection_manager.cc

Issue 61213009: Don't drop debug_info when posting to sync server fails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed erroneous use of SYNC_EXPORT_PRIVATE from MockDebugInfoGetter. Created 7 years, 1 month 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
« no previous file with comments | « sync/test/engine/mock_connection_manager.h ('k') | sync/test/sessions/mock_debug_info_getter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/engine/mock_connection_manager.cc
diff --git a/sync/test/engine/mock_connection_manager.cc b/sync/test/engine/mock_connection_manager.cc
index 624e02218822a9c2fc9509f10280222fbabb5915..434f6c36fc692b5047fe11442a8a50276bdf657e 100644
--- a/sync/test/engine/mock_connection_manager.cc
+++ b/sync/test/engine/mock_connection_manager.cc
@@ -83,7 +83,8 @@ bool MockConnectionManager::PostBufferToPath(PostBufferParams* params,
CHECK(post.has_protocol_version());
CHECK(post.has_api_key());
CHECK(post.has_bag_of_chips());
- last_request_.CopyFrom(post);
+
+ requests_.push_back(post);
client_stuck_ = post.sync_problem_detected();
sync_pb::ClientToServerResponse response;
response.Clear();
@@ -686,6 +687,17 @@ const CommitResponse& MockConnectionManager::last_commit_response() const {
return *commit_responses_.back();
}
+const sync_pb::ClientToServerMessage&
+ MockConnectionManager::last_request() const {
+ EXPECT_TRUE(!requests_.empty());
+ return requests_.back();
+}
+
+const std::vector<sync_pb::ClientToServerMessage>&
+ MockConnectionManager::requests() const {
+ return requests_;
+}
+
bool MockConnectionManager::IsModelTypePresentInSpecifics(
const google::protobuf::RepeatedPtrField<
sync_pb::DataTypeProgressMarker>& filter,
« no previous file with comments | « sync/test/engine/mock_connection_manager.h ('k') | sync/test/sessions/mock_debug_info_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698