diff options
author | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-10 05:20:11 +0000 |
---|---|---|
committer | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-10 05:20:11 +0000 |
commit | fc290d614c7fab02dcdaf88b992a0204be23aa90 (patch) | |
tree | 10400ca878d8c999249c694758006aa1d380333a /sync/internal_api/write_transaction.cc | |
parent | db06cc16af9cb0eaa766603f2e56f490041665db (diff) | |
download | chromium_src-fc290d614c7fab02dcdaf88b992a0204be23aa90.zip chromium_src-fc290d614c7fab02dcdaf88b992a0204be23aa90.tar.gz chromium_src-fc290d614c7fab02dcdaf88b992a0204be23aa90.tar.bz2 |
Populate versions on individual nodes in sync model and native bookmark model.
Update transaction versions of changed sync models and entries in
syncable::WriteTransaction after change delegate calculates changes and returns
handles of changed entries. For syncer changes, updated version is passed to
change processor and set on native model and nodes. For sync API changes, model
processor queries for new version and set on native model and nodes after write
transaction closes.
BUG=154858
Review URL: https://chromiumcodereview.appspot.com/11341048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/write_transaction.cc')
-rw-r--r-- | sync/internal_api/write_transaction.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sync/internal_api/write_transaction.cc b/sync/internal_api/write_transaction.cc index fe11adf..cf0f121 100644 --- a/sync/internal_api/write_transaction.cc +++ b/sync/internal_api/write_transaction.cc @@ -18,6 +18,16 @@ WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here, share->directory.get()); } +WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here, + UserShare* share, + int64* new_model_version) + : BaseTransaction(share), + transaction_(NULL) { + transaction_ = new syncable::WriteTransaction(from_here, + share->directory.get(), + new_model_version); +} + WriteTransaction::~WriteTransaction() { delete transaction_; } |