| 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 // | |
| 5 // Mock ServerConnectionManager class for use in client unit tests. | |
| 6 | 4 |
| 7 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 8 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| 9 | 7 |
| 10 #include <stdint.h> | 8 #include <stdint.h> |
| 11 | 9 |
| 12 #include <bitset> | 10 #include <bitset> |
| 13 #include <list> | 11 #include <list> |
| 14 #include <memory> | 12 #include <memory> |
| 15 #include <string> | 13 #include <string> |
| 16 #include <vector> | 14 #include <vector> |
| 17 | 15 |
| 18 #include "base/callback.h" | 16 #include "base/callback.h" |
| 19 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 20 #include "base/macros.h" | 18 #include "base/macros.h" |
| 21 #include "base/memory/scoped_vector.h" | 19 #include "base/memory/scoped_vector.h" |
| 22 #include "base/synchronization/lock.h" | 20 #include "base/synchronization/lock.h" |
| 23 #include "components/sync/base/model_type.h" | 21 #include "components/sync/base/model_type.h" |
| 24 #include "components/sync/base/unique_position.h" | 22 #include "components/sync/base/unique_position.h" |
| 25 #include "components/sync/engine_impl/net/server_connection_manager.h" | 23 #include "components/sync/engine_impl/net/server_connection_manager.h" |
| 26 #include "components/sync/protocol/sync.pb.h" | 24 #include "components/sync/protocol/sync.pb.h" |
| 27 | 25 |
| 28 namespace syncer { | 26 namespace syncer { |
| 29 | 27 |
| 28 // Mock ServerConnectionManager class for use in client unit tests. |
| 30 class MockConnectionManager : public ServerConnectionManager { | 29 class MockConnectionManager : public ServerConnectionManager { |
| 31 public: | 30 public: |
| 32 class MidCommitObserver { | 31 class MidCommitObserver { |
| 33 public: | 32 public: |
| 34 virtual void Observe() = 0; | 33 virtual void Observe() = 0; |
| 35 | 34 |
| 36 protected: | 35 protected: |
| 37 virtual ~MidCommitObserver() {} | 36 virtual ~MidCommitObserver() {} |
| 38 }; | 37 }; |
| 39 | 38 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 std::string next_token_; | 405 std::string next_token_; |
| 407 | 406 |
| 408 std::vector<sync_pb::ClientToServerMessage> requests_; | 407 std::vector<sync_pb::ClientToServerMessage> requests_; |
| 409 | 408 |
| 410 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); | 409 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); |
| 411 }; | 410 }; |
| 412 | 411 |
| 413 } // namespace syncer | 412 } // namespace syncer |
| 414 | 413 |
| 415 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 414 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
| OLD | NEW |