| 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 COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 7 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 8 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 8 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 base::Lock store_birthday_lock_; | 348 base::Lock store_birthday_lock_; |
| 349 bool store_birthday_sent_; | 349 bool store_birthday_sent_; |
| 350 bool client_stuck_; | 350 bool client_stuck_; |
| 351 std::string commit_time_rename_prepended_string_; | 351 std::string commit_time_rename_prepended_string_; |
| 352 | 352 |
| 353 // On each PostBufferToPath() call, we decrement this counter. The call fails | 353 // On each PostBufferToPath() call, we decrement this counter. The call fails |
| 354 // iff we hit zero at that call. | 354 // iff we hit zero at that call. |
| 355 int countdown_to_postbuffer_fail_; | 355 int countdown_to_postbuffer_fail_; |
| 356 | 356 |
| 357 // Our directory. Used only to ensure that we are not holding the transaction | 357 // Our directory. Used only to ensure that we are not holding the transaction |
| 358 // lock when performing network I/O. Can be NULL if the test author is | 358 // lock when performing network I/O. Can be null if the test author is |
| 359 // confident this can't happen. | 359 // confident this can't happen. |
| 360 syncable::Directory* directory_; | 360 syncable::Directory* directory_; |
| 361 | 361 |
| 362 // The updates we'll return to the next request. | 362 // The updates we'll return to the next request. |
| 363 std::list<sync_pb::GetUpdatesResponse> update_queue_; | 363 std::list<sync_pb::GetUpdatesResponse> update_queue_; |
| 364 base::Closure mid_commit_callback_; | 364 base::Closure mid_commit_callback_; |
| 365 MidCommitObserver* mid_commit_observer_; | 365 MidCommitObserver* mid_commit_observer_; |
| 366 | 366 |
| 367 // The keystore key we return for a GetUpdates with need_encryption_key set. | 367 // The keystore key we return for a GetUpdates with need_encryption_key set. |
| 368 std::string keystore_key_; | 368 std::string keystore_key_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 std::string next_token_; | 406 std::string next_token_; |
| 407 | 407 |
| 408 std::vector<sync_pb::ClientToServerMessage> requests_; | 408 std::vector<sync_pb::ClientToServerMessage> requests_; |
| 409 | 409 |
| 410 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); | 410 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); |
| 411 }; | 411 }; |
| 412 | 412 |
| 413 } // namespace syncer | 413 } // namespace syncer |
| 414 | 414 |
| 415 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 415 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| OLD | NEW |