OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/conflict_resolver.h" | 5 #include "components/sync/engine_impl/conflict_resolver.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/metrics/histogram_macros.h" | 11 #include "base/metrics/histogram_macros.h" |
12 #include "components/sync/base/cryptographer.h" | 12 #include "components/sync/base/cryptographer.h" |
13 #include "components/sync/engine/cycle/update_counters.h" | 13 #include "components/sync/engine/cycle/update_counters.h" |
14 #include "components/sync/engine_impl/conflict_util.h" | 14 #include "components/sync/engine_impl/conflict_util.h" |
15 #include "components/sync/engine_impl/cycle/status_controller.h" | 15 #include "components/sync/engine_impl/cycle/status_controller.h" |
16 #include "components/sync/engine_impl/syncer_util.h" | 16 #include "components/sync/engine_impl/syncer_util.h" |
17 #include "components/sync/syncable/directory.h" | 17 #include "components/sync/syncable/directory.h" |
18 #include "components/sync/syncable/mutable_entry.h" | 18 #include "components/sync/syncable/mutable_entry.h" |
19 #include "components/sync/syncable/syncable_write_transaction.h" | 19 #include "components/sync/syncable/syncable_write_transaction.h" |
20 | 20 |
21 using std::list; | 21 using std::list; |
22 using std::set; | 22 using std::set; |
23 | 23 |
24 namespace syncer { | 24 namespace syncer { |
25 | 25 |
26 using syncable::Directory; | 26 using syncer::syncable::Directory; |
27 using syncable::Entry; | 27 using syncer::syncable::Entry; |
28 using syncable::Id; | 28 using syncer::syncable::Id; |
29 using syncable::MutableEntry; | 29 using syncer::syncable::MutableEntry; |
30 using syncable::WriteTransaction; | 30 using syncer::syncable::WriteTransaction; |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // Returns true iff the set of attachment ids contained in attachment_metadata | 34 // Returns true iff the set of attachment ids contained in attachment_metadata |
35 // matches the set of ids contained in server_attachment_metadata. | 35 // matches the set of ids contained in server_attachment_metadata. |
36 bool AttachmentMetadataMatches(const MutableEntry& entity) { | 36 bool AttachmentMetadataMatches(const MutableEntry& entity) { |
37 const sync_pb::AttachmentMetadata& local = entity.GetAttachmentMetadata(); | 37 const sync_pb::AttachmentMetadata& local = entity.GetAttachmentMetadata(); |
38 const sync_pb::AttachmentMetadata& server = | 38 const sync_pb::AttachmentMetadata& server = |
39 entity.GetServerAttachmentMetadata(); | 39 entity.GetServerAttachmentMetadata(); |
40 if (local.record_size() != server.record_size()) { | 40 if (local.record_size() != server.record_size()) { |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 GetModelTypeFromSpecifics(conflicting_node.GetSpecifics()))) { | 277 GetModelTypeFromSpecifics(conflicting_node.GetSpecifics()))) { |
278 continue; | 278 continue; |
279 } | 279 } |
280 | 280 |
281 ProcessSimpleConflict(trans, *it, cryptographer, status, counters); | 281 ProcessSimpleConflict(trans, *it, cryptographer, status, counters); |
282 } | 282 } |
283 return; | 283 return; |
284 } | 284 } |
285 | 285 |
286 } // namespace syncer | 286 } // namespace syncer |
OLD | NEW |