Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1101)

Side by Side Diff: sync/engine/syncer_util.h

Issue 533113002: Add test that checks function UpdateServerFieldsFromUpdate is working (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sync/engine/syncer_util_unittest.cc » ('j') | sync/engine/syncer_util_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | sync/engine/syncer_util_unittest.cc » ('j') | sync/engine/syncer_util_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698