summaryrefslogtreecommitdiffstats
path: root/sync/syncable/directory.h
diff options
context:
space:
mode:
authorhaitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 23:36:14 +0000
committerhaitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 23:36:14 +0000
commit734012a12e1ba5539b8ace50dbd59ba5c32c9aef (patch)
tree7044e917eca83078b4bf178d5376da561b42047b /sync/syncable/directory.h
parent0e2b516cc74125a97490921751bec186e11ab4eb (diff)
downloadchromium_src-734012a12e1ba5539b8ace50dbd59ba5c32c9aef.zip
chromium_src-734012a12e1ba5539b8ace50dbd59ba5c32c9aef.tar.gz
chromium_src-734012a12e1ba5539b8ace50dbd59ba5c32c9aef.tar.bz2
[Sync] Add transaction_version to sync DB schema and PersistedKernelInfo. Read/save transactions_version when loading/saving kernel info.
BUG=154858 Review URL: https://chromiumcodereview.appspot.com/11088015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable/directory.h')
-rw-r--r--sync/syncable/directory.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index 49d598c..c123e36 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -161,6 +161,13 @@ class Directory {
// Last sync timestamp fetched from the server.
sync_pb::DataTypeProgressMarker download_progress[MODEL_TYPE_COUNT];
+ // Sync-side transaction version per data type. Monotonically incremented
+ // when updating native model. A copy is also saved in native model.
+ // Later out-of-sync models can be detected and fixed by comparing
+ // transaction versions of sync model and native model.
+ // TODO(hatiaol): implement detection and fixing of out-of-sync models.
+ // Bug 154858.
+ int64 transaction_version[MODEL_TYPE_COUNT];
// true iff we ever reached the end of the changelog.
ModelTypeSet initial_sync_ended;
// The store birthday we were given by the server. Contents are opaque to