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 #include "components/sync/core/shared_model_type_processor.h" | 5 #include "components/sync/core/shared_model_type_processor.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | |
11 #include <memory> | |
12 #include <utility> | 10 #include <utility> |
13 #include <vector> | 11 #include <vector> |
14 | 12 |
15 #include "base/bind.h" | 13 #include "base/bind.h" |
16 #include "base/callback.h" | 14 #include "base/callback.h" |
17 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
18 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
19 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
20 #include "components/sync/api/data_type_error_handler_mock.h" | 18 #include "components/sync/api/data_type_error_handler_mock.h" |
21 #include "components/sync/api/fake_model_type_service.h" | 19 #include "components/sync/api/fake_model_type_service.h" |
22 #include "components/sync/base/model_type.h" | |
23 #include "components/sync/base/time.h" | 20 #include "components/sync/base/time.h" |
24 #include "components/sync/core/activation_context.h" | 21 #include "components/sync/core/activation_context.h" |
25 #include "components/sync/core/simple_metadata_change_list.h" | 22 #include "components/sync/core/simple_metadata_change_list.h" |
26 #include "components/sync/engine/commit_queue.h" | 23 #include "components/sync/engine/commit_queue.h" |
27 #include "components/sync/protocol/sync.pb.h" | |
28 #include "components/sync/test/engine/mock_model_type_worker.h" | 24 #include "components/sync/test/engine/mock_model_type_worker.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
30 | 26 |
31 using sync_pb::EntitySpecifics; | 27 using sync_pb::EntitySpecifics; |
32 using sync_pb::EntityMetadata; | 28 using sync_pb::EntityMetadata; |
33 using sync_pb::DataTypeState; | 29 using sync_pb::DataTypeState; |
34 | 30 |
35 namespace syncer { | 31 namespace syncer { |
36 | 32 |
37 namespace { | 33 namespace { |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 | 1264 |
1269 UpdateResponseDataList update; | 1265 UpdateResponseDataList update; |
1270 update.push_back(worker()->GenerateUpdateData(kHash1, specifics1, 1, "k1")); | 1266 update.push_back(worker()->GenerateUpdateData(kHash1, specifics1, 1, "k1")); |
1271 worker()->UpdateWithEncryptionKey("k1", update); | 1267 worker()->UpdateWithEncryptionKey("k1", update); |
1272 | 1268 |
1273 EXPECT_EQ(2U, worker()->GetNumPendingCommits()); | 1269 EXPECT_EQ(2U, worker()->GetNumPendingCommits()); |
1274 worker()->ExpectNthPendingCommit(1, kHash1, specifics2); | 1270 worker()->ExpectNthPendingCommit(1, kHash1, specifics2); |
1275 } | 1271 } |
1276 | 1272 |
1277 } // namespace syncer | 1273 } // namespace syncer |
OLD | NEW |