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/model_impl/shared_model_type_processor.h" | 5 #include "components/sync/model_impl/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 <utility> | 10 #include <utility> |
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 "components/sync/base/time.h" | 18 #include "components/sync/base/time.h" |
19 #include "components/sync/core/activation_context.h" | 19 #include "components/sync/engine/activation_context.h" |
20 #include "components/sync/engine/commit_queue.h" | 20 #include "components/sync/engine/commit_queue.h" |
21 #include "components/sync/model/data_type_error_handler_mock.h" | 21 #include "components/sync/model/data_type_error_handler_mock.h" |
22 #include "components/sync/model/fake_model_type_service.h" | 22 #include "components/sync/model/fake_model_type_service.h" |
23 #include "components/sync/model/simple_metadata_change_list.h" | 23 #include "components/sync/model/simple_metadata_change_list.h" |
24 #include "components/sync/test/engine/mock_model_type_worker.h" | 24 #include "components/sync/test/engine/mock_model_type_worker.h" |
25 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
26 | 26 |
27 using sync_pb::EntitySpecifics; | 27 using sync_pb::EntitySpecifics; |
28 using sync_pb::EntityMetadata; | 28 using sync_pb::EntityMetadata; |
29 using sync_pb::ModelTypeState; | 29 using sync_pb::ModelTypeState; |
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 | 1299 |
1300 UpdateResponseDataList update; | 1300 UpdateResponseDataList update; |
1301 update.push_back(worker()->GenerateUpdateData(kHash1, specifics1, 1, "k1")); | 1301 update.push_back(worker()->GenerateUpdateData(kHash1, specifics1, 1, "k1")); |
1302 worker()->UpdateWithEncryptionKey("k1", update); | 1302 worker()->UpdateWithEncryptionKey("k1", update); |
1303 | 1303 |
1304 EXPECT_EQ(2U, worker()->GetNumPendingCommits()); | 1304 EXPECT_EQ(2U, worker()->GetNumPendingCommits()); |
1305 worker()->ExpectNthPendingCommit(1, kHash1, specifics2); | 1305 worker()->ExpectNthPendingCommit(1, kHash1, specifics2); |
1306 } | 1306 } |
1307 | 1307 |
1308 } // namespace syncer | 1308 } // namespace syncer |
OLD | NEW |