Lines Matching full:update
100 // among the children will be valid after the loop, since we update all
105 // Update Id references on the previous and next nodes in the sibling
111 // We just need a shallow update to |entry|'s fields since it is already
132 const SyncEntity& update) {
136 // DB has not yet been modified, no entries created for this update.
140 if (update.has_client_defined_unique_tag() &&
141 !update.client_defined_unique_tag().empty()) {
148 // Case 1, we don't have to do anything since the update will
149 // work just fine. Update will end up in the proper entry, via ID lookup.
155 // this update gets targeted at the correct local entry; we expect conflict
160 update.client_defined_unique_tag());
167 if (local_entry.Get(ID) != update.id()) {
170 if (local_entry.Get(ID) < update.id()) {
171 // Signal an error; drop this update on the floor. Note that
179 // we'll change the ID of the local entry to update.id()
187 // update will now be applied to local_entry.
193 } else if (update.has_originator_cache_guid() &&
194 update.originator_cache_guid() == client_id) {
210 // description, we should update the ID and version to the
214 update.originator_client_item_id());
222 int64 new_version = update.version();
233 << update.id() << " local id: " << local_entry.Get(ID)
240 return update.id();
256 VLOG(1) << "Skipping update, returning conflict for: " << id
264 // We catch most unfixable tree invariant errors at update receipt time,
290 // We intercept updates to the Nigori node, update the Cryptographer and
317 // And, because this update will not be applied yet, next time around
319 VLOG(1) << "Marking nigori node update as conflicting due to being unable"
382 const SyncEntity& update,
384 if (update.deleted()) {
409 DCHECK(target->Get(ID) == update.id())
411 target->Put(SERVER_PARENT_ID, update.parent_id());
413 target->Put(SERVER_VERSION, update.version());
415 ServerTimeToClientTime(update.ctime()));
417 ServerTimeToClientTime(update.mtime()));
418 target->Put(SERVER_IS_DIR, update.IsFolder());
419 if (update.has_server_defined_unique_tag()) {
420 const std::string& tag = update.server_defined_unique_tag();
423 if (update.has_client_defined_unique_tag()) {
424 const std::string& tag = update.client_defined_unique_tag();
428 if (update.has_specifics()) {
429 DCHECK(update.GetModelType() != syncable::UNSPECIFIED)
431 target->Put(SERVER_SPECIFICS, update.specifics());
432 } else if (update.has_bookmarkdata()) {
434 const SyncEntity::BookmarkData& bookmark = update.bookmarkdata();
435 UpdateBookmarkSpecifics(update.server_defined_unique_tag(),
440 if (update.has_position_in_parent())
441 target->Put(SERVER_POSITION_IN_PARENT, update.position_in_parent());
443 target->Put(SERVER_IS_DEL, update.deleted());
445 // local data. If we're processing the update that corresponds to one of our
447 if (update.version() > target->Get(BASE_VERSION)) {
543 // This function is called on an entry when we can update the user-facing data
686 const SyncEntity& update,
690 // Not a new update.
706 const SyncEntity& update,
714 // If the update is a delete, we don't really need to worry at this stage.
719 // This update is to an item of a datatype we don't recognize. The server
725 // Then we've had an update for this entry before.
731 LOG(ERROR) << "Server update doesn't agree with previous updates. ";
733 LOG(ERROR) << " Update: "
734 << SyncerProtoUtil::SyncEntityDebugString(update);
739 if (!deleted && (target->Get(ID) == update.id()) &&
744 // when the server does not give us an update following the
748 SyncerUtil::VerifyUndelete(trans, update, target);
754 // We've committed this update in the past.
757 LOG(ERROR) << "Server update doesn't agree with committed item. ";
759 LOG(ERROR) << " Update: "
760 << SyncerProtoUtil::SyncEntityDebugString(update);
763 if (target->Get(ID) == update.id()) {
765 if (target->Get(BASE_VERSION) == update.version() &&
767 !SyncerProtoUtil::Compare(*target, update)) {
770 LOG(ERROR) << "Server update doesn't match local data with same "
772 "Update: " << SyncerProtoUtil::SyncEntityDebugString(update);
775 if (target->Get(SERVER_VERSION) > update.version()) {
778 LOG(WARNING) << " Update: "
779 << SyncerProtoUtil::SyncEntityDebugString(update);
787 // Assumes we have an existing entry; verify an update that seems to be
791 const SyncEntity& update,
802 VLOG(1) << "Server update is attempting undelete. " << *target
803 << "Update:" << SyncerProtoUtil::SyncEntityDebugString(update);
815 if (update.version() < target->Get(SERVER_VERSION)) {
816 LOG(WARNING) << "Update older than current server version for "
817 << *target << " Update:"
818 update);