OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MODEL_TYPE_WORKER_H_ | 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_WORKER_H_ |
6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_WORKER_H_ | 6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_WORKER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <deque> | 11 #include <deque> |
12 #include <map> | 12 #include <map> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "components/sync/core/model_type_processor.h" | |
18 #include "components/sync/core/non_blocking_sync_common.h" | |
19 #include "components/sync/engine/commit_queue.h" | 17 #include "components/sync/engine/commit_queue.h" |
| 18 #include "components/sync/engine/model_type_processor.h" |
| 19 #include "components/sync/engine/non_blocking_sync_common.h" |
20 #include "components/sync/protocol/model_type_state.pb.h" | 20 #include "components/sync/protocol/model_type_state.pb.h" |
21 #include "components/sync/protocol/sync.pb.h" | 21 #include "components/sync/protocol/sync.pb.h" |
22 | 22 |
23 namespace syncer { | 23 namespace syncer { |
24 | 24 |
25 // Receives and records commit requests sent through the ModelTypeWorker. | 25 // Receives and records commit requests sent through the ModelTypeWorker. |
26 // | 26 // |
27 // This class also includes features intended to help mock out server behavior. | 27 // This class also includes features intended to help mock out server behavior. |
28 // It has some basic functionality to keep track of server state and generate | 28 // It has some basic functionality to keep track of server state and generate |
29 // plausible UpdateResponseData and CommitResponseData messages. | 29 // plausible UpdateResponseData and CommitResponseData messages. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Map of versions by client tag hash. | 119 // Map of versions by client tag hash. |
120 // This is an essential part of the mocked server state. | 120 // This is an essential part of the mocked server state. |
121 std::map<const std::string, int64_t> server_versions_; | 121 std::map<const std::string, int64_t> server_versions_; |
122 | 122 |
123 DISALLOW_COPY_AND_ASSIGN(MockModelTypeWorker); | 123 DISALLOW_COPY_AND_ASSIGN(MockModelTypeWorker); |
124 }; | 124 }; |
125 | 125 |
126 } // namespace syncer | 126 } // namespace syncer |
127 | 127 |
128 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_WORKER_H_ | 128 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_WORKER_H_ |
OLD | NEW |