OLD | NEW |
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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 } | 262 } |
263 | 263 |
264 // Explicitly indicate that we will not be fetching some updates. | 264 // Explicitly indicate that we will not be fetching some updates. |
265 void ClearUpdatesQueue() { | 265 void ClearUpdatesQueue() { |
266 update_queue_.clear(); | 266 update_queue_.clear(); |
267 } | 267 } |
268 | 268 |
269 // Locate the most recent update message for purpose of alteration. | 269 // Locate the most recent update message for purpose of alteration. |
270 sync_pb::SyncEntity* GetMutableLastUpdate(); | 270 sync_pb::SyncEntity* GetMutableLastUpdate(); |
271 | 271 |
| 272 // Adds a new progress marker to the last update. |
| 273 sync_pb::DataTypeProgressMarker* AddUpdateProgressMarker(); |
| 274 |
272 private: | 275 private: |
273 sync_pb::SyncEntity* AddUpdateFull(syncable::Id id, | 276 sync_pb::SyncEntity* AddUpdateFull(syncable::Id id, |
274 syncable::Id parentid, | 277 syncable::Id parentid, |
275 const std::string& name, | 278 const std::string& name, |
276 int64 version, | 279 int64 version, |
277 int64 sync_ts, | 280 int64 sync_ts, |
278 bool is_dir); | 281 bool is_dir); |
279 sync_pb::SyncEntity* AddUpdateFull(const std::string& id, | 282 sync_pb::SyncEntity* AddUpdateFull(const std::string& id, |
280 const std::string& parentid, | 283 const std::string& parentid, |
281 const std::string& name, | 284 const std::string& name, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 std::string next_token_; | 420 std::string next_token_; |
418 | 421 |
419 std::vector<sync_pb::ClientToServerMessage> requests_; | 422 std::vector<sync_pb::ClientToServerMessage> requests_; |
420 | 423 |
421 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); | 424 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); |
422 }; | 425 }; |
423 | 426 |
424 } // namespace syncer | 427 } // namespace syncer |
425 | 428 |
426 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 429 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
OLD | NEW |