[Sync] Fix undeletion during commit logic
commit5a36760990918e47c63d9c19471aab229f566b3d
authorzea <zea@chromium.org>
Thu, 2 Apr 2015 01:11:04 +0000 (1 18:11 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 2 Apr 2015 01:12:08 +0000 (2 01:12 +0000)
tree5dfe480798a4980edaae5dcd0c779bb7edcfbdc9
parent9faf912c9b5e7135630e2ccb7fbfe4e451d66a77
[Sync] Fix undeletion during commit logic

We were relying on the SYNCING bit to track whether a commit has begun or not.
This will not work in all cases, as any modification actually unsets the
SYNCING bit, thereby making it unreliable as a source for whether a sync cycle
has started for an entity. To fix that, introduce a new DIRTY_SYNC bit that
is only modified when a entry becomes dirty during a sync cycle. SYNCING can
then better match it's name, and will stay true until the sync cycle ends.

BUG=466098
TEST=repeatedly bookmark a page then remove the bookmark

Review URL: https://codereview.chromium.org/1048933003

Cr-Commit-Position: refs/heads/master@{#323388}
sync/engine/commit_util.cc
sync/engine/directory_commit_contribution.cc
sync/engine/directory_commit_contribution_unittest.cc
sync/engine/syncer_unittest.cc
sync/syncable/entry.cc
sync/syncable/entry.h
sync/syncable/entry_kernel.h
sync/syncable/model_neutral_mutable_entry.cc
sync/syncable/model_neutral_mutable_entry.h
sync/syncable/mutable_entry.cc
sync/syncable/syncable_enum_conversions.cc