| 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 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <bitset> | 10 #include <bitset> |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 // Explicitly indicate that we will not be fetching some updates. | 266 // Explicitly indicate that we will not be fetching some updates. |
| 267 void ClearUpdatesQueue() { update_queue_.clear(); } | 267 void ClearUpdatesQueue() { update_queue_.clear(); } |
| 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. | 272 // Adds a new progress marker to the last update. |
| 273 sync_pb::DataTypeProgressMarker* AddUpdateProgressMarker(); | 273 sync_pb::DataTypeProgressMarker* AddUpdateProgressMarker(); |
| 274 | 274 |
| 275 void ResetAuthToken() { auth_token_.clear(); } |
| 276 |
| 275 private: | 277 private: |
| 276 sync_pb::SyncEntity* AddUpdateFull(syncable::Id id, | 278 sync_pb::SyncEntity* AddUpdateFull(syncable::Id id, |
| 277 syncable::Id parentid, | 279 syncable::Id parentid, |
| 278 const std::string& name, | 280 const std::string& name, |
| 279 int64_t version, | 281 int64_t version, |
| 280 int64_t sync_ts, | 282 int64_t sync_ts, |
| 281 bool is_dir); | 283 bool is_dir); |
| 282 sync_pb::SyncEntity* AddUpdateFull(const std::string& id, | 284 sync_pb::SyncEntity* AddUpdateFull(const std::string& id, |
| 283 const std::string& parentid, | 285 const std::string& parentid, |
| 284 const std::string& name, | 286 const std::string& name, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 std::string next_token_; | 415 std::string next_token_; |
| 414 | 416 |
| 415 std::vector<sync_pb::ClientToServerMessage> requests_; | 417 std::vector<sync_pb::ClientToServerMessage> requests_; |
| 416 | 418 |
| 417 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); | 419 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); |
| 418 }; | 420 }; |
| 419 | 421 |
| 420 } // namespace syncer | 422 } // namespace syncer |
| 421 | 423 |
| 422 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 424 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| OLD | NEW |