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/engine_impl/directory_update_handler.h" | 5 #include "components/sync/engine_impl/directory_update_handler.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
16 #include "components/sync/base/attachment_id_proto.h" | 16 #include "components/sync/base/attachment_id_proto.h" |
17 #include "components/sync/core/test/test_entry_factory.h" | |
18 #include "components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h" | 17 #include "components/sync/engine_impl/cycle/directory_type_debug_info_emitter.h" |
19 #include "components/sync/engine_impl/cycle/status_controller.h" | 18 #include "components/sync/engine_impl/cycle/status_controller.h" |
20 #include "components/sync/engine_impl/syncer_proto_util.h" | 19 #include "components/sync/engine_impl/syncer_proto_util.h" |
| 20 #include "components/sync/engine_impl/test_entry_factory.h" |
21 #include "components/sync/protocol/sync.pb.h" | 21 #include "components/sync/protocol/sync.pb.h" |
22 #include "components/sync/syncable/directory.h" | 22 #include "components/sync/syncable/directory.h" |
23 #include "components/sync/syncable/entry.h" | 23 #include "components/sync/syncable/entry.h" |
24 #include "components/sync/syncable/mutable_entry.h" | 24 #include "components/sync/syncable/mutable_entry.h" |
25 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h" | 25 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h" |
26 #include "components/sync/syncable/syncable_proto_util.h" | 26 #include "components/sync/syncable/syncable_proto_util.h" |
27 #include "components/sync/syncable/syncable_read_transaction.h" | 27 #include "components/sync/syncable/syncable_read_transaction.h" |
28 #include "components/sync/syncable/syncable_write_transaction.h" | 28 #include "components/sync/syncable/syncable_write_transaction.h" |
29 #include "components/sync/test/engine/fake_model_worker.h" | 29 #include "components/sync/test/engine/fake_model_worker.h" |
30 #include "components/sync/test/engine/test_directory_setter_upper.h" | 30 #include "components/sync/test/engine/test_directory_setter_upper.h" |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 const UpdateCounters& counters = GetArticlesUpdateCounters(); | 1153 const UpdateCounters& counters = GetArticlesUpdateCounters(); |
1154 EXPECT_EQ(1, counters.num_updates_applied); | 1154 EXPECT_EQ(1, counters.num_updates_applied); |
1155 EXPECT_EQ(1, counters.num_local_overwrites); | 1155 EXPECT_EQ(1, counters.num_local_overwrites); |
1156 EXPECT_EQ(0, counters.num_server_overwrites); | 1156 EXPECT_EQ(0, counters.num_server_overwrites); |
1157 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle); | 1157 local_metadata = entry_factory()->GetLocalAttachmentMetadataForItem(handle); |
1158 EXPECT_EQ(server_metadata.SerializeAsString(), | 1158 EXPECT_EQ(server_metadata.SerializeAsString(), |
1159 local_metadata.SerializeAsString()); | 1159 local_metadata.SerializeAsString()); |
1160 } | 1160 } |
1161 | 1161 |
1162 } // namespace syncer | 1162 } // namespace syncer |
OLD | NEW |