Roll src/third_party/WebKit 96fb88b:6bbd108 (svn 201045:201047)
[chromium-blink-merge.git] / sync / syncable / write_transaction_info.h
blob823a66c488d35b6c783d88a7e9a48453c275195d
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
3 // found in the LICENSE file.
5 #ifndef SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_
6 #define SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_
8 #include "sync/syncable/entry_kernel.h"
9 #include "sync/syncable/syncable_base_transaction.h"
11 namespace syncer {
12 namespace syncable {
14 // A struct describing the changes made during a transaction.
15 struct WriteTransactionInfo {
16 WriteTransactionInfo(int64 id,
17 tracked_objects::Location location,
18 WriterTag writer,
19 ImmutableEntryKernelMutationMap mutations);
20 WriteTransactionInfo();
21 ~WriteTransactionInfo();
23 // Caller owns the return value.
24 base::DictionaryValue* ToValue(size_t max_mutations_size) const;
26 int64 id;
27 // If tracked_objects::Location becomes assignable, we can use that
28 // instead.
29 std::string location_string;
30 WriterTag writer;
31 ImmutableEntryKernelMutationMap mutations;
34 typedef
35 Immutable<WriteTransactionInfo>
36 ImmutableWriteTransactionInfo;
38 } // namespace syncable
39 } // namespace syncer
41 #endif // SYNC_SYNCABLE_WRITE_TRANSACTION_INFO_H_