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 COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 5 #ifndef COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "components/sync/base/immutable.h" | 17 #include "components/sync/base/immutable.h" |
18 #include "components/sync/base/model_type.h" | 18 #include "components/sync/base/model_type.h" |
19 #include "components/sync/base/proto_value_ptr.h" | 19 #include "components/sync/base/proto_value_ptr.h" |
20 #include "components/sync/base/sync_export.h" | |
21 #include "components/sync/base/time.h" | 20 #include "components/sync/base/time.h" |
22 #include "components/sync/base/unique_position.h" | 21 #include "components/sync/base/unique_position.h" |
23 #include "components/sync/protocol/attachments.pb.h" | 22 #include "components/sync/protocol/attachments.pb.h" |
24 #include "components/sync/protocol/sync.pb.h" | 23 #include "components/sync/protocol/sync.pb.h" |
25 #include "components/sync/syncable/metahandle_set.h" | 24 #include "components/sync/syncable/metahandle_set.h" |
26 #include "components/sync/syncable/syncable_id.h" | 25 #include "components/sync/syncable/syncable_id.h" |
27 | 26 |
28 namespace syncer { | 27 namespace syncer { |
29 | 28 |
30 class Cryptographer; | 29 class Cryptographer; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 SYNCING = BIT_TEMPS_BEGIN, | 185 SYNCING = BIT_TEMPS_BEGIN, |
187 // Whether a local change was made to an entity that had SYNCING set to true, | 186 // Whether a local change was made to an entity that had SYNCING set to true, |
188 // and was therefore in the middle of a commit operation. | 187 // and was therefore in the middle of a commit operation. |
189 // Note: must only be set if SYNCING is true. | 188 // Note: must only be set if SYNCING is true. |
190 DIRTY_SYNC, | 189 DIRTY_SYNC, |
191 BIT_TEMPS_END, | 190 BIT_TEMPS_END, |
192 }; | 191 }; |
193 | 192 |
194 enum { BIT_TEMPS_COUNT = BIT_TEMPS_END - BIT_TEMPS_BEGIN }; | 193 enum { BIT_TEMPS_COUNT = BIT_TEMPS_END - BIT_TEMPS_BEGIN }; |
195 | 194 |
196 struct SYNC_EXPORT EntryKernel { | 195 struct EntryKernel { |
197 private: | 196 private: |
198 typedef syncer::ProtoValuePtr<sync_pb::EntitySpecifics> EntitySpecificsPtr; | 197 typedef syncer::ProtoValuePtr<sync_pb::EntitySpecifics> EntitySpecificsPtr; |
199 typedef syncer::ProtoValuePtr<sync_pb::AttachmentMetadata> | 198 typedef syncer::ProtoValuePtr<sync_pb::AttachmentMetadata> |
200 AttachmentMetadataPtr; | 199 AttachmentMetadataPtr; |
201 | 200 |
202 std::string string_fields[STRING_FIELDS_COUNT]; | 201 std::string string_fields[STRING_FIELDS_COUNT]; |
203 EntitySpecificsPtr specifics_fields[PROTO_FIELDS_COUNT]; | 202 EntitySpecificsPtr specifics_fields[PROTO_FIELDS_COUNT]; |
204 int64_t int64_fields[INT64_FIELDS_COUNT]; | 203 int64_t int64_fields[INT64_FIELDS_COUNT]; |
205 base::Time time_fields[TIME_FIELDS_COUNT]; | 204 base::Time time_fields[TIME_FIELDS_COUNT]; |
206 Id id_fields[ID_FIELDS_COUNT]; | 205 Id id_fields[ID_FIELDS_COUNT]; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 // Caller owns the return value. | 407 // Caller owns the return value. |
409 base::ListValue* EntryKernelMutationMapToValue( | 408 base::ListValue* EntryKernelMutationMapToValue( |
410 const EntryKernelMutationMap& mutations); | 409 const EntryKernelMutationMap& mutations); |
411 | 410 |
412 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel); | 411 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel); |
413 | 412 |
414 } // namespace syncable | 413 } // namespace syncable |
415 } // namespace syncer | 414 } // namespace syncer |
416 | 415 |
417 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 416 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
OLD | NEW |