Chromium Code Reviews| Index: sync/syncable/write_transaction.h |
| diff --git a/sync/syncable/write_transaction.h b/sync/syncable/write_transaction.h |
| index 17264c4c65e3c883439ca84f202c7d1e5b0af24a..0af308dcae37314213a4f319a84bc8a060fe81fb 100644 |
| --- a/sync/syncable/write_transaction.h |
| +++ b/sync/syncable/write_transaction.h |
| @@ -17,6 +17,12 @@ class WriteTransaction : public BaseTransaction { |
| WriteTransaction(const tracked_objects::Location& from_here, |
| WriterTag writer, Directory* directory); |
| + // Constructor used for getting back model version after making sync |
| + // API changes to one model. During destruction, |new_model_version| stores |
| + // the new model version if model is changed, or -1 if model is not changed. |
|
tim (not reviewing)
2012/11/08 17:38:49
Note that we don't technically scope a write trans
haitaol1
2012/11/08 19:06:53
If the transaction is for processing syncer change
|
| + WriteTransaction(const tracked_objects::Location& from_here, |
| + Directory* directory, int64* new_model_version); |
| + |
| virtual ~WriteTransaction(); |
| void SaveOriginal(const EntryKernel* entry); |
| @@ -36,10 +42,17 @@ class WriteTransaction : public BaseTransaction { |
| ModelTypeSet NotifyTransactionChangingAndEnding( |
| const ImmutableEntryKernelMutationMap& mutations); |
| + // Increment versions of the models whose entries are modified and set the |
| + // version on the changed entries. |
| + void UpdateTransactionVersion(const std::vector<int64>& entry_changed); |
| + |
| // Only the original fields are filled in until |RecordMutations()|. |
| // We use a mutation map instead of a kernel set to avoid copying. |
| EntryKernelMutationMap mutations_; |
| + // Not owned. |
|
tim (not reviewing)
2012/11/08 17:38:49
Can you explain more what this is for? Why is it
haitaol1
2012/11/08 19:06:53
Done. transaction_version seems better than model
|
| + int64* new_model_version_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(WriteTransaction); |
| }; |