Lines Matching refs:syncable
20 using syncable::BaseTransaction;
21 using syncable::Directory;
22 using syncable::Entry;
23 using syncable::Id;
24 using syncable::MutableEntry;
25 using syncable::ScopedDirLookup;
26 using syncable::WriteTransaction;
48 entry->Put(syncable::IS_UNSYNCED, false); in IgnoreLocalChanges()
58 entry->Put(syncable::BASE_VERSION, entry->Get(syncable::SERVER_VERSION)); in OverwriteServerChanges()
59 entry->Put(syncable::IS_UNAPPLIED_UPDATE, false); in OverwriteServerChanges()
66 MutableEntry entry(trans, syncable::GET_BY_ID, id); in ProcessSimpleConflict()
71 if (!entry.Get(syncable::IS_UNSYNCED)) { in ProcessSimpleConflict()
75 if (!entry.Get(syncable::IS_UNAPPLIED_UPDATE)) { in ProcessSimpleConflict()
76 if (!entry.Get(syncable::PARENT_ID).ServerKnows()) { in ProcessSimpleConflict()
87 if (entry.Get(syncable::IS_DEL) && entry.Get(syncable::SERVER_IS_DEL)) { in ProcessSimpleConflict()
90 entry.Put(syncable::IS_UNSYNCED, false); in ProcessSimpleConflict()
91 entry.Put(syncable::IS_UNAPPLIED_UPDATE, false); in ProcessSimpleConflict()
97 if (!entry.Get(syncable::SERVER_IS_DEL)) { in ProcessSimpleConflict()
104 bool name_matches = entry.Get(syncable::NON_UNIQUE_NAME) == in ProcessSimpleConflict()
105 entry.Get(syncable::SERVER_NON_UNIQUE_NAME); in ProcessSimpleConflict()
106 bool parent_matches = entry.Get(syncable::PARENT_ID) == in ProcessSimpleConflict()
107 entry.Get(syncable::SERVER_PARENT_ID); in ProcessSimpleConflict()
108 bool entry_deleted = entry.Get(syncable::IS_DEL); in ProcessSimpleConflict()
122 if (entry.Get(syncable::IS_DIR)) { in ProcessSimpleConflict()
125 entry.Get(syncable::ID), in ProcessSimpleConflict()
135 if (!entry.Get(syncable::UNIQUE_CLIENT_TAG).empty()) { in ProcessSimpleConflict()
138 DCHECK_EQ(entry.Get(syncable::SERVER_VERSION), 0) << "For the server to " in ProcessSimpleConflict()
143 entry.Put(syncable::SERVER_VERSION, 0); in ProcessSimpleConflict()
144 entry.Put(syncable::BASE_VERSION, 0); in ProcessSimpleConflict()
150 MutableEntry server_update(trans, syncable::GET_BY_ID, id); in ProcessSimpleConflict()
152 CHECK(server_update.Get(syncable::META_HANDLE) != in ProcessSimpleConflict()
153 entry.Get(syncable::META_HANDLE)) in ProcessSimpleConflict()
179 MutableEntry entryi(trans, syncable::GET_BY_ID, *i); in AttemptToFixCircularConflict()
180 if (entryi.Get(syncable::PARENT_ID) == in AttemptToFixCircularConflict()
181 entryi.Get(syncable::SERVER_PARENT_ID) || in AttemptToFixCircularConflict()
182 !entryi.Get(syncable::IS_UNAPPLIED_UPDATE) || in AttemptToFixCircularConflict()
183 !entryi.Get(syncable::IS_DIR)) { in AttemptToFixCircularConflict()
186 Id parentid = entryi.Get(syncable::SERVER_PARENT_ID); in AttemptToFixCircularConflict()
189 Entry parent(trans, syncable::GET_BY_ID, parentid); in AttemptToFixCircularConflict()
197 Entry parent(trans, syncable::GET_BY_ID, parentid); in AttemptToFixCircularConflict()
201 parentid = parent.Get(syncable::PARENT_ID); in AttemptToFixCircularConflict()
206 entryi.Put(syncable::BASE_VERSION, entryi.Get(syncable::SERVER_VERSION)); in AttemptToFixCircularConflict()
207 entryi.Put(syncable::IS_UNSYNCED, true); in AttemptToFixCircularConflict()
208 entryi.Put(syncable::IS_UNAPPLIED_UPDATE, false); in AttemptToFixCircularConflict()
218 if (!entry.Get(syncable::IS_UNSYNCED) || entry.Get(syncable::IS_DEL)) in AttemptToFixUnsyncedEntryInDeletedServerTree()
220 Id parentid = entry.Get(syncable::PARENT_ID); in AttemptToFixUnsyncedEntryInDeletedServerTree()
221 MutableEntry parent(trans, syncable::GET_BY_ID, parentid); in AttemptToFixUnsyncedEntryInDeletedServerTree()
222 if (!parent.good() || !parent.Get(syncable::IS_UNAPPLIED_UPDATE) || in AttemptToFixUnsyncedEntryInDeletedServerTree()
223 !parent.Get(syncable::SERVER_IS_DEL) || in AttemptToFixUnsyncedEntryInDeletedServerTree()
235 Entry parent(trans, syncable::GET_BY_ID, id); in AttemptToFixUnsyncedEntryInDeletedServerTree()
236 if (!parent.good() || !parent.Get(syncable::IS_UNAPPLIED_UPDATE) || in AttemptToFixUnsyncedEntryInDeletedServerTree()
237 !parent.Get(syncable::SERVER_IS_DEL)) in AttemptToFixUnsyncedEntryInDeletedServerTree()
239 id = parent.Get(syncable::PARENT_ID); in AttemptToFixUnsyncedEntryInDeletedServerTree()
244 MutableEntry parent(trans, syncable::GET_BY_ID, id); in AttemptToFixUnsyncedEntryInDeletedServerTree()
251 parent.Put(syncable::BASE_VERSION, 0); in AttemptToFixUnsyncedEntryInDeletedServerTree()
252 parent.Put(syncable::IS_UNSYNCED, true); in AttemptToFixUnsyncedEntryInDeletedServerTree()
253 id = parent.Get(syncable::PARENT_ID); in AttemptToFixUnsyncedEntryInDeletedServerTree()
263 if (!entry.Get(syncable::IS_UNAPPLIED_UPDATE) || in AttemptToFixUpdateEntryInDeletedLocalTree()
264 entry.Get(syncable::SERVER_IS_DEL)) in AttemptToFixUpdateEntryInDeletedLocalTree()
266 Id parent_id = entry.Get(syncable::SERVER_PARENT_ID); in AttemptToFixUpdateEntryInDeletedLocalTree()
267 MutableEntry parent(trans, syncable::GET_BY_ID, parent_id); in AttemptToFixUpdateEntryInDeletedLocalTree()
268 if (!parent.good() || !parent.Get(syncable::IS_DEL) || in AttemptToFixUpdateEntryInDeletedLocalTree()
280 Id reroot_id = syncable::kNullId; in AttemptToFixUpdateEntryInDeletedLocalTree()
284 Entry parent(trans, syncable::GET_BY_ID, id); in AttemptToFixUpdateEntryInDeletedLocalTree()
291 CHECK(parent.Get(syncable::IS_DIR)); in AttemptToFixUpdateEntryInDeletedLocalTree()
298 if (parent.Get(syncable::IS_DEL)) in AttemptToFixUpdateEntryInDeletedLocalTree()
302 if (!parent.Get(syncable::IS_DEL) || in AttemptToFixUpdateEntryInDeletedLocalTree()
303 parent.Get(syncable::SERVER_IS_DEL) || in AttemptToFixUpdateEntryInDeletedLocalTree()
304 !parent.Get(syncable::IS_UNSYNCED)) { in AttemptToFixUpdateEntryInDeletedLocalTree()
307 id = parent.Get(syncable::PARENT_ID); in AttemptToFixUpdateEntryInDeletedLocalTree()
311 if (id == entry.Get(syncable::ID)) in AttemptToFixUpdateEntryInDeletedLocalTree()
312 reroot_id = entry.Get(syncable::PARENT_ID); in AttemptToFixUpdateEntryInDeletedLocalTree()
322 MutableEntry entry(trans, syncable::GET_BY_ID, id); in AttemptToFixUpdateEntryInDeletedLocalTree()
325 << ", will have name " << entry.Get(syncable::NON_UNIQUE_NAME); in AttemptToFixUpdateEntryInDeletedLocalTree()
327 Id parent_id = entry.Get(syncable::PARENT_ID); in AttemptToFixUpdateEntryInDeletedLocalTree()
331 entry.Put(syncable::PARENT_ID, parent_id); in AttemptToFixUpdateEntryInDeletedLocalTree()
332 entry.Put(syncable::IS_DEL, false); in AttemptToFixUpdateEntryInDeletedLocalTree()
333 id = entry.Get(syncable::PARENT_ID); in AttemptToFixUpdateEntryInDeletedLocalTree()
343 Entry entry(trans, syncable::GET_BY_ID, *i); in AttemptToFixRemovedDirectoriesWithContent()
405 Entry e(trans, syncable::GET_BY_ID, *i); in LogAndSignalIfConflictStuck()
422 WriteTransaction trans(dir, syncable::SYNCER, __FILE__, __LINE__); in ResolveSimpleConflicts()
467 WriteTransaction trans(dir, syncable::SYNCER, __FILE__, __LINE__); in ResolveConflicts()