From 1858410f3beb10255da673b90f7dabbd97fbc708 Mon Sep 17 00:00:00 2001 From: "haitaol@chromium.org" Date: Fri, 26 Oct 2012 05:06:45 +0000 Subject: Transaction version is used to detect out-of-sync between sync model and native model. The values in sync model and native model should be equal. If not, there're some changes that are applied in one but not the other. This change updates the transaction version of a model type in sync when changes to its native model are found. And implement native transaction version for bookmark model. BUG=154858 Review URL: https://chromiumcodereview.appspot.com/11028146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164263 0039d316-1c4b-4281-b951-d872f2087c98 --- sync/internal_api/read_transaction.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sync/internal_api/read_transaction.cc') diff --git a/sync/internal_api/read_transaction.cc b/sync/internal_api/read_transaction.cc index 32296f7..6de2f42 100644 --- a/sync/internal_api/read_transaction.cc +++ b/sync/internal_api/read_transaction.cc @@ -4,6 +4,7 @@ #include "sync/internal_api/public/read_transaction.h" +#include "sync/syncable/directory.h" #include "sync/syncable/read_transaction.h" namespace syncer { @@ -35,4 +36,8 @@ syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const { return transaction_; } +int64 ReadTransaction::GetModelVersion(ModelType type) { + return transaction_->directory()->GetTransactionVersion(type); +} + } // namespace syncer -- cgit v1.1