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