Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: components/sync/test/engine/mock_model_type_processor.h

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_PROCESSOR_H_ 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_
6 #define COMPONENTS_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 <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/macros.h" 17 #include "base/macros.h"
18 #include "components/sync/core/model_type_processor.h" 18 #include "components/sync/core/model_type_processor.h"
19 #include "components/sync/core/non_blocking_sync_common.h" 19 #include "components/sync/core/non_blocking_sync_common.h"
20 #include "components/sync/protocol/data_type_state.pb.h" 20 #include "components/sync/protocol/data_type_state.pb.h"
21 21
22 namespace syncer { 22 namespace syncer_v2 {
23 23
24 // Mocks the ModelTypeProcessor. 24 // Mocks the ModelTypeProcessor.
25 // 25 //
26 // This mock is made simpler by not using any threads. It does still have the 26 // This mock is made simpler by not using any threads. It does still have the
27 // ability to defer execution if we need to test race conditions, though. 27 // ability to defer execution if we need to test race conditions, though.
28 // 28 //
29 // It maintains some state to try to make its behavior more realistic. It 29 // It maintains some state to try to make its behavior more realistic. It
30 // updates this state as it creates commit requests or receives update and 30 // updates this state as it creates commit requests or receives update and
31 // commit responses. 31 // commit responses.
32 // 32 //
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 std::map<const std::string, int64_t> sequence_numbers_; 139 std::map<const std::string, int64_t> sequence_numbers_;
140 std::map<const std::string, int64_t> base_versions_; 140 std::map<const std::string, int64_t> base_versions_;
141 std::map<const std::string, std::string> assigned_ids_; 141 std::map<const std::string, std::string> assigned_ids_;
142 142
143 // Callback which will be call during disconnection 143 // Callback which will be call during disconnection
144 DisconnectCallback disconnect_callback_; 144 DisconnectCallback disconnect_callback_;
145 145
146 DISALLOW_COPY_AND_ASSIGN(MockModelTypeProcessor); 146 DISALLOW_COPY_AND_ASSIGN(MockModelTypeProcessor);
147 }; 147 };
148 148
149 } // namespace syncer 149 } // namespace syncer_v2
150 150
151 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ 151 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « components/sync/test/engine/fake_sync_scheduler.cc ('k') | components/sync/test/engine/mock_model_type_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698