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 "sync/internal_api/public/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> | 10 #include <map> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "base/run_loop.h" | 17 #include "base/run_loop.h" |
18 #include "sync/api/fake_model_type_service.h" | 18 #include "components/sync/api/fake_model_type_service.h" |
19 #include "sync/engine/commit_queue.h" | 19 #include "components/sync/base/model_type.h" |
20 #include "sync/internal_api/public/activation_context.h" | 20 #include "components/sync/base/time.h" |
21 #include "sync/internal_api/public/base/model_type.h" | 21 #include "components/sync/core/activation_context.h" |
22 #include "sync/internal_api/public/data_batch_impl.h" | 22 #include "components/sync/core/data_batch_impl.h" |
23 #include "sync/internal_api/public/non_blocking_sync_common.h" | 23 #include "components/sync/core/non_blocking_sync_common.h" |
24 #include "sync/internal_api/public/simple_metadata_change_list.h" | 24 #include "components/sync/core/simple_metadata_change_list.h" |
25 #include "sync/internal_api/public/test/data_type_error_handler_mock.h" | 25 #include "components/sync/core/test/data_type_error_handler_mock.h" |
26 #include "sync/protocol/data_type_state.pb.h" | 26 #include "components/sync/engine_impl/commit_queue.h" |
27 #include "sync/protocol/sync.pb.h" | 27 #include "components/sync/protocol/data_type_state.pb.h" |
28 #include "sync/syncable/syncable_util.h" | 28 #include "components/sync/protocol/sync.pb.h" |
29 #include "sync/test/engine/mock_model_type_worker.h" | 29 #include "components/sync/syncable/syncable_util.h" |
30 #include "sync/util/time.h" | 30 #include "components/sync/test/engine/mock_model_type_worker.h" |
31 #include "testing/gtest/include/gtest/gtest.h" | 31 #include "testing/gtest/include/gtest/gtest.h" |
32 | 32 |
33 namespace syncer_v2 { | 33 namespace syncer_v2 { |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 const std::string kTag1 = "tag1"; | 37 const std::string kTag1 = "tag1"; |
38 const std::string kTag2 = "tag2"; | 38 const std::string kTag2 = "tag2"; |
39 const std::string kTag3 = "tag3"; | 39 const std::string kTag3 = "tag3"; |
40 const std::string kValue1 = "value1"; | 40 const std::string kValue1 = "value1"; |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 | 1505 |
1506 UpdateResponseDataList update; | 1506 UpdateResponseDataList update; |
1507 update.push_back(worker()->GenerateUpdateData(kTag1, kValue1, 1, "k1")); | 1507 update.push_back(worker()->GenerateUpdateData(kTag1, kValue1, 1, "k1")); |
1508 worker()->UpdateWithEncryptionKey("k1", update); | 1508 worker()->UpdateWithEncryptionKey("k1", update); |
1509 | 1509 |
1510 EXPECT_EQ(2U, worker()->GetNumPendingCommits()); | 1510 EXPECT_EQ(2U, worker()->GetNumPendingCommits()); |
1511 worker()->ExpectNthPendingCommit(1, kTag1, kValue2); | 1511 worker()->ExpectNthPendingCommit(1, kTag1, kValue2); |
1512 } | 1512 } |
1513 | 1513 |
1514 } // namespace syncer_v2 | 1514 } // namespace syncer_v2 |
OLD | NEW |