summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public/write_transaction.h
diff options
context:
space:
mode:
authorhaitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-10 05:20:11 +0000
committerhaitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-10 05:20:11 +0000
commitfc290d614c7fab02dcdaf88b992a0204be23aa90 (patch)
tree10400ca878d8c999249c694758006aa1d380333a /sync/internal_api/public/write_transaction.h
parentdb06cc16af9cb0eaa766603f2e56f490041665db (diff)
downloadchromium_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/public/write_transaction.h')
-rw-r--r--sync/internal_api/public/write_transaction.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sync/internal_api/public/write_transaction.h b/sync/internal_api/public/write_transaction.h
index df27cad..8c11570 100644
--- a/sync/internal_api/public/write_transaction.h
+++ b/sync/internal_api/public/write_transaction.h
@@ -30,6 +30,12 @@ class WriteTransaction : public BaseTransaction {
// Start a new read/write transaction.
WriteTransaction(const tracked_objects::Location& from_here,
UserShare* share);
+ // |transaction_version| stores updated model and nodes version if model
+ // is changed by the transaction, or syncer::syncable::kInvalidTransaction
+ // if not after transaction is closed. This constructor is used for model
+ // types that support embassy data.
+ WriteTransaction(const tracked_objects::Location& from_here,
+ UserShare* share, int64* transaction_version);
virtual ~WriteTransaction();
// Provide access to the syncable transaction from the API WriteNode.
@@ -40,7 +46,7 @@ class WriteTransaction : public BaseTransaction {
WriteTransaction() {}
void SetTransaction(syncable::WriteTransaction* trans) {
- transaction_ = trans;
+ transaction_ = trans;
}
private: