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 SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ | 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ |
6 #define SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ | 6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "sync/internal_api/public/model_type_processor.h" | 17 #include "components/sync/core/model_type_processor.h" |
18 #include "sync/internal_api/public/non_blocking_sync_common.h" | 18 #include "components/sync/core/non_blocking_sync_common.h" |
19 #include "sync/protocol/data_type_state.pb.h" | 19 #include "components/sync/protocol/data_type_state.pb.h" |
20 | 20 |
21 namespace syncer_v2 { | 21 namespace syncer_v2 { |
22 | 22 |
23 // Mocks the ModelTypeProcessor. | 23 // Mocks the ModelTypeProcessor. |
24 // | 24 // |
25 // This mock is made simpler by not using any threads. It does still have the | 25 // This mock is made simpler by not using any threads. It does still have the |
26 // ability to defer execution if we need to test race conditions, though. | 26 // ability to defer execution if we need to test race conditions, though. |
27 // | 27 // |
28 // It maintains some state to try to make its behavior more realistic. It | 28 // It maintains some state to try to make its behavior more realistic. It |
29 // updates this state as it creates commit requests or receives update and | 29 // updates this state as it creates commit requests or receives update and |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 std::map<const std::string, std::string> assigned_ids_; | 142 std::map<const std::string, std::string> assigned_ids_; |
143 | 143 |
144 // Callback which will be call during disconnection | 144 // Callback which will be call during disconnection |
145 DisconnectCallback disconnect_callback_; | 145 DisconnectCallback disconnect_callback_; |
146 | 146 |
147 DISALLOW_COPY_AND_ASSIGN(MockModelTypeProcessor); | 147 DISALLOW_COPY_AND_ASSIGN(MockModelTypeProcessor); |
148 }; | 148 }; |
149 | 149 |
150 } // namespace syncer_v2 | 150 } // namespace syncer_v2 |
151 | 151 |
152 #endif // SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ | 152 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ |
OLD | NEW |