OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SYNC_SYNCABLE_WRITE_TRANSACTION_H_ | 5 #ifndef SYNC_SYNCABLE_WRITE_TRANSACTION_H_ |
6 #define SYNC_SYNCABLE_WRITE_TRANSACTION_H_ | 6 #define SYNC_SYNCABLE_WRITE_TRANSACTION_H_ |
7 | 7 |
8 #include "sync/syncable/base_transaction.h" | 8 #include "sync/syncable/base_transaction.h" |
9 #include "sync/syncable/entry_kernel.h" | 9 #include "sync/syncable/entry_kernel.h" |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 friend class MutableEntry; | 29 friend class MutableEntry; |
30 | 30 |
31 // Clears |mutations_|. | 31 // Clears |mutations_|. |
32 ImmutableEntryKernelMutationMap RecordMutations(); | 32 ImmutableEntryKernelMutationMap RecordMutations(); |
33 | 33 |
34 void UnlockAndNotify(const ImmutableEntryKernelMutationMap& mutations); | 34 void UnlockAndNotify(const ImmutableEntryKernelMutationMap& mutations); |
35 | 35 |
36 ModelTypeSet NotifyTransactionChangingAndEnding( | 36 ModelTypeSet NotifyTransactionChangingAndEnding( |
37 const ImmutableEntryKernelMutationMap& mutations); | 37 const ImmutableEntryKernelMutationMap& mutations); |
38 | 38 |
| 39 // Increment versions of the models whose entries are modified and set the |
| 40 // version on the changed entries. |
| 41 void UpdateTransactionVersion(const std::vector<int64>& entry_changed); |
| 42 |
39 // Only the original fields are filled in until |RecordMutations()|. | 43 // Only the original fields are filled in until |RecordMutations()|. |
40 // We use a mutation map instead of a kernel set to avoid copying. | 44 // We use a mutation map instead of a kernel set to avoid copying. |
41 EntryKernelMutationMap mutations_; | 45 EntryKernelMutationMap mutations_; |
42 | 46 |
43 DISALLOW_COPY_AND_ASSIGN(WriteTransaction); | 47 DISALLOW_COPY_AND_ASSIGN(WriteTransaction); |
44 }; | 48 }; |
45 | 49 |
46 } // namespace syncable | 50 } // namespace syncable |
47 } // namespace syncer | 51 } // namespace syncer |
48 | 52 |
49 #endif // SYNC_SYNCABLE_WRITE_TRANSACTION_H_ | 53 #endif // SYNC_SYNCABLE_WRITE_TRANSACTION_H_ |
OLD | NEW |