OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_INFO_H_ | 5 #ifndef SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_ |
6 #define SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_ | 6 #define SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <string> | 11 #include <string> |
9 | 12 |
10 #include "sync/syncable/entry_kernel.h" | 13 #include "sync/syncable/entry_kernel.h" |
11 #include "sync/syncable/syncable_base_transaction.h" | 14 #include "sync/syncable/syncable_base_transaction.h" |
12 | 15 |
13 namespace syncer { | 16 namespace syncer { |
14 namespace syncable { | 17 namespace syncable { |
15 | 18 |
16 // A struct describing the changes made during a transaction. | 19 // A struct describing the changes made during a transaction. |
17 struct WriteTransactionInfo { | 20 struct WriteTransactionInfo { |
18 WriteTransactionInfo(int64 id, | 21 WriteTransactionInfo(int64_t id, |
19 tracked_objects::Location location, | 22 tracked_objects::Location location, |
20 WriterTag writer, | 23 WriterTag writer, |
21 ImmutableEntryKernelMutationMap mutations); | 24 ImmutableEntryKernelMutationMap mutations); |
22 WriteTransactionInfo(); | 25 WriteTransactionInfo(); |
23 ~WriteTransactionInfo(); | 26 ~WriteTransactionInfo(); |
24 | 27 |
25 // Caller owns the return value. | 28 // Caller owns the return value. |
26 base::DictionaryValue* ToValue(size_t max_mutations_size) const; | 29 base::DictionaryValue* ToValue(size_t max_mutations_size) const; |
27 | 30 |
28 int64 id; | 31 int64_t id; |
29 // If tracked_objects::Location becomes assignable, we can use that | 32 // If tracked_objects::Location becomes assignable, we can use that |
30 // instead. | 33 // instead. |
31 std::string location_string; | 34 std::string location_string; |
32 WriterTag writer; | 35 WriterTag writer; |
33 ImmutableEntryKernelMutationMap mutations; | 36 ImmutableEntryKernelMutationMap mutations; |
34 }; | 37 }; |
35 | 38 |
36 typedef | 39 typedef |
37 Immutable<WriteTransactionInfo> | 40 Immutable<WriteTransactionInfo> |
38 ImmutableWriteTransactionInfo; | 41 ImmutableWriteTransactionInfo; |
39 | 42 |
40 } // namespace syncable | 43 } // namespace syncable |
41 } // namespace syncer | 44 } // namespace syncer |
42 | 45 |
43 #endif // SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_ | 46 #endif // SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_ |
OLD | NEW |