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

Side by Side Diff: sync/test/engine/mock_connection_manager.h

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 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
« no previous file with comments | « sync/sync_tests.gypi ('k') | sync/test/engine/mock_connection_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Mock ServerConnectionManager class for use in client unit tests. 5 // Mock ServerConnectionManager class for use in client unit tests.
6 6
7 #ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 7 #ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
8 #define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 8 #define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
9 9
10 #include <bitset> 10 #include <bitset>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 const std::vector<sync_pb::CommitResponse*>& commit_responses() const { 187 const std::vector<sync_pb::CommitResponse*>& commit_responses() const {
188 return commit_responses_.get(); 188 return commit_responses_.get();
189 } 189 }
190 // Retrieve the last sent commit message. 190 // Retrieve the last sent commit message.
191 const sync_pb::CommitMessage& last_sent_commit() const; 191 const sync_pb::CommitMessage& last_sent_commit() const;
192 192
193 // Retrieve the last returned commit response. 193 // Retrieve the last returned commit response.
194 const sync_pb::CommitResponse& last_commit_response() const; 194 const sync_pb::CommitResponse& last_commit_response() const;
195 195
196 // Retrieve the last request submitted to the server (regardless of type). 196 // Retrieve the last request submitted to the server (regardless of type).
197 const sync_pb::ClientToServerMessage& last_request() const { 197 const sync_pb::ClientToServerMessage& last_request() const;
198 return last_request_; 198
199 } 199 // Retrieve the cumulative collection of all requests sent by clients.
200 const std::vector<sync_pb::ClientToServerMessage>& requests() const;
200 201
201 void set_conflict_all_commits(bool value) { 202 void set_conflict_all_commits(bool value) {
202 conflict_all_commits_ = value; 203 conflict_all_commits_ = value;
203 } 204 }
204 void set_next_new_id(int value) { 205 void set_next_new_id(int value) {
205 next_new_id_ = value; 206 next_new_id_ = value;
206 } 207 }
207 void set_conflict_n_commits(int value) { 208 void set_conflict_n_commits(int value) {
208 conflict_n_commits_ = value; 209 conflict_n_commits_ = value;
209 } 210 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // If this option is set to true, then the MockConnectionManager will 389 // If this option is set to true, then the MockConnectionManager will
389 // use the older sync_pb::SyncEntity_BookmarkData-style protocol. 390 // use the older sync_pb::SyncEntity_BookmarkData-style protocol.
390 bool use_legacy_bookmarks_protocol_; 391 bool use_legacy_bookmarks_protocol_;
391 392
392 ModelTypeSet expected_filter_; 393 ModelTypeSet expected_filter_;
393 394
394 int num_get_updates_requests_; 395 int num_get_updates_requests_;
395 396
396 std::string next_token_; 397 std::string next_token_;
397 398
398 sync_pb::ClientToServerMessage last_request_; 399 std::vector<sync_pb::ClientToServerMessage> requests_;
399 400
400 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); 401 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
401 }; 402 };
402 403
403 } // namespace syncer 404 } // namespace syncer
404 405
405 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 406 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/sync_tests.gypi ('k') | sync/test/engine/mock_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698