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_SINGLE_TYPE_MOCK_SERVER_H_ | 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_SINGLE_TYPE_MOCK_SERVER_H_ |
6 #define SYNC_TEST_ENGINE_SINGLE_TYPE_MOCK_SERVER_H_ | 6 #define COMPONENTS_SYNC_TEST_ENGINE_SINGLE_TYPE_MOCK_SERVER_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/macros.h" | 15 #include "base/macros.h" |
16 #include "sync/internal_api/public/base/model_type.h" | 16 #include "components/sync/base/model_type.h" |
17 #include "sync/internal_api/public/non_blocking_sync_common.h" | 17 #include "components/sync/core/non_blocking_sync_common.h" |
18 | 18 |
19 namespace syncer { | 19 namespace syncer { |
20 | 20 |
21 // A mock server used to test of happy-path update and commit logic. | 21 // A mock server used to test of happy-path update and commit logic. |
22 // | 22 // |
23 // This object supports only one ModelType, which must be specified at | 23 // This object supports only one ModelType, which must be specified at |
24 // initialization time. It does not support GetUpdates messages. It does not | 24 // initialization time. It does not support GetUpdates messages. It does not |
25 // support simulated errors. | 25 // support simulated errors. |
26 // | 26 // |
27 // This class is useful for testing UpdateHandlers and CommitContributors. | 27 // This class is useful for testing UpdateHandlers and CommitContributors. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 std::vector<sync_pb::ClientToServerMessage> commit_messages_; | 91 std::vector<sync_pb::ClientToServerMessage> commit_messages_; |
92 | 92 |
93 // Map of most recent commits by tag_hash. | 93 // Map of most recent commits by tag_hash. |
94 std::map<const std::string, sync_pb::SyncEntity> committed_items_; | 94 std::map<const std::string, sync_pb::SyncEntity> committed_items_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(SingleTypeMockServer); | 96 DISALLOW_COPY_AND_ASSIGN(SingleTypeMockServer); |
97 }; | 97 }; |
98 | 98 |
99 } // namespace syncer | 99 } // namespace syncer |
100 | 100 |
101 #endif // SYNC_TEST_ENGINE_SINGLE_TYPE_MOCK_SERVER_H_ | 101 #endif // COMPONENTS_SYNC_TEST_ENGINE_SINGLE_TYPE_MOCK_SERVER_H_ |
OLD | NEW |