| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // Utility functions manipulating syncable::Entries, intended for use by the | 5 // Utility functions manipulating syncable::Entries, intended for use by the |
| 6 // syncer. | 6 // syncer. |
| 7 | 7 |
| 8 #ifndef SYNC_ENGINE_SYNCER_UTIL_H_ | 8 #ifndef SYNC_ENGINE_SYNCER_UTIL_H_ |
| 9 #define SYNC_ENGINE_SYNCER_UTIL_H_ | 9 #define SYNC_ENGINE_SYNCER_UTIL_H_ |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 SYNC_EXPORT_PRIVATE UniquePosition GetUpdatePosition( | 62 SYNC_EXPORT_PRIVATE UniquePosition GetUpdatePosition( |
| 63 const sync_pb::SyncEntity& update, | 63 const sync_pb::SyncEntity& update, |
| 64 const std::string& suffix); | 64 const std::string& suffix); |
| 65 | 65 |
| 66 // Fetch the cache_guid and item_id-based unique bookmark tag from an update. | 66 // Fetch the cache_guid and item_id-based unique bookmark tag from an update. |
| 67 // Will return an empty string if someting unexpected happens. | 67 // Will return an empty string if someting unexpected happens. |
| 68 SYNC_EXPORT_PRIVATE std::string GetUniqueBookmarkTagFromUpdate( | 68 SYNC_EXPORT_PRIVATE std::string GetUniqueBookmarkTagFromUpdate( |
| 69 const sync_pb::SyncEntity& update); | 69 const sync_pb::SyncEntity& update); |
| 70 | 70 |
| 71 // Pass in name to avoid redundant UTF8 conversion. | 71 // Pass in name to avoid redundant UTF8 conversion. |
| 72 void UpdateServerFieldsFromUpdate( | 72 SYNC_EXPORT_PRIVATE void UpdateServerFieldsFromUpdate( |
| 73 syncable::ModelNeutralMutableEntry* local_entry, | 73 syncable::ModelNeutralMutableEntry* local_entry, |
| 74 const sync_pb::SyncEntity& server_entry, | 74 const sync_pb::SyncEntity& server_entry, |
| 75 const std::string& name); | 75 const std::string& name); |
| 76 | 76 |
| 77 // Creates a new Entry iff no Entry exists with the given id. | 77 // Creates a new Entry iff no Entry exists with the given id. |
| 78 void CreateNewEntry(syncable::ModelNeutralWriteTransaction *trans, | 78 void CreateNewEntry(syncable::ModelNeutralWriteTransaction *trans, |
| 79 const syncable::Id& id); | 79 const syncable::Id& id); |
| 80 | 80 |
| 81 // This function is called on an entry when we can update the user-facing data | 81 // This function is called on an entry when we can update the user-facing data |
| 82 // from the server data. | 82 // from the server data. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 106 syncable::ModelNeutralMutableEntry* target); | 106 syncable::ModelNeutralMutableEntry* target); |
| 107 | 107 |
| 108 void MarkDeletedChildrenSynced( | 108 void MarkDeletedChildrenSynced( |
| 109 syncable::Directory* dir, | 109 syncable::Directory* dir, |
| 110 syncable::BaseWriteTransaction* trans, | 110 syncable::BaseWriteTransaction* trans, |
| 111 std::set<syncable::Id>* deleted_folders); | 111 std::set<syncable::Id>* deleted_folders); |
| 112 | 112 |
| 113 } // namespace syncer | 113 } // namespace syncer |
| 114 | 114 |
| 115 #endif // SYNC_ENGINE_SYNCER_UTIL_H_ | 115 #endif // SYNC_ENGINE_SYNCER_UTIL_H_ |
| OLD | NEW |