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/syncer_util.h" | 5 #include "components/sync/engine_impl/syncer_util.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "components/sync/syncable/mutable_entry.h" | 33 #include "components/sync/syncable/mutable_entry.h" |
34 #include "components/sync/syncable/syncable_changes_version.h" | 34 #include "components/sync/syncable/syncable_changes_version.h" |
35 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h" | 35 #include "components/sync/syncable/syncable_model_neutral_write_transaction.h" |
36 #include "components/sync/syncable/syncable_proto_util.h" | 36 #include "components/sync/syncable/syncable_proto_util.h" |
37 #include "components/sync/syncable/syncable_read_transaction.h" | 37 #include "components/sync/syncable/syncable_read_transaction.h" |
38 #include "components/sync/syncable/syncable_util.h" | 38 #include "components/sync/syncable/syncable_util.h" |
39 #include "components/sync/syncable/syncable_write_transaction.h" | 39 #include "components/sync/syncable/syncable_write_transaction.h" |
40 | 40 |
41 namespace syncer { | 41 namespace syncer { |
42 | 42 |
43 using syncable::CHANGES_VERSION; | 43 using syncer::syncable::CHANGES_VERSION; |
44 using syncable::Directory; | 44 using syncer::syncable::Directory; |
45 using syncable::Entry; | 45 using syncer::syncable::Entry; |
46 using syncable::GET_BY_HANDLE; | 46 using syncer::syncable::GET_BY_HANDLE; |
47 using syncable::GET_BY_ID; | 47 using syncer::syncable::GET_BY_ID; |
48 using syncable::ID; | 48 using syncer::syncable::ID; |
49 using syncable::Id; | 49 using syncer::syncable::Id; |
50 | 50 |
51 syncable::Id FindLocalIdToUpdate(syncable::BaseTransaction* trans, | 51 syncable::Id FindLocalIdToUpdate(syncable::BaseTransaction* trans, |
52 const sync_pb::SyncEntity& update) { | 52 const sync_pb::SyncEntity& update) { |
53 // Expected entry points of this function: | 53 // Expected entry points of this function: |
54 // SyncEntity has NOT been applied to SERVER fields. | 54 // SyncEntity has NOT been applied to SERVER fields. |
55 // SyncEntity has NOT been applied to LOCAL fields. | 55 // SyncEntity has NOT been applied to LOCAL fields. |
56 // DB has not yet been modified, no entries created for this update. | 56 // DB has not yet been modified, no entries created for this update. |
57 | 57 |
58 const std::string& client_id = trans->directory()->cache_guid(); | 58 const std::string& client_id = trans->directory()->cache_guid(); |
59 const syncable::Id& update_id = SyncableIdFromProto(update.id_string()); | 59 const syncable::Id& update_id = SyncableIdFromProto(update.id_string()); |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 if (update.version() < target->GetServerVersion()) { | 648 if (update.version() < target->GetServerVersion()) { |
649 LOG(WARNING) << "Update older than current server version for " << *target | 649 LOG(WARNING) << "Update older than current server version for " << *target |
650 << " Update:" | 650 << " Update:" |
651 << SyncerProtoUtil::SyncEntityDebugString(update); | 651 << SyncerProtoUtil::SyncEntityDebugString(update); |
652 return VERIFY_SUCCESS; // Expected in new sync protocol. | 652 return VERIFY_SUCCESS; // Expected in new sync protocol. |
653 } | 653 } |
654 return VERIFY_UNDECIDED; | 654 return VERIFY_UNDECIDED; |
655 } | 655 } |
656 | 656 |
657 } // namespace syncer | 657 } // namespace syncer |
OLD | NEW |