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_ENTRY_KERNEL_H_ | 5 #ifndef SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
6 #define SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 6 #define SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 } | 326 } |
327 inline sync_pb::EntitySpecifics& mutable_ref(ProtoField field) { | 327 inline sync_pb::EntitySpecifics& mutable_ref(ProtoField field) { |
328 return specifics_fields[field - PROTO_FIELDS_BEGIN]; | 328 return specifics_fields[field - PROTO_FIELDS_BEGIN]; |
329 } | 329 } |
330 inline Id& mutable_ref(IdField field) { | 330 inline Id& mutable_ref(IdField field) { |
331 return id_fields[field - ID_FIELDS_BEGIN]; | 331 return id_fields[field - ID_FIELDS_BEGIN]; |
332 } | 332 } |
333 inline UniquePosition& mutable_ref(UniquePositionField field) { | 333 inline UniquePosition& mutable_ref(UniquePositionField field) { |
334 return unique_position_fields[field - UNIQUE_POSITION_FIELDS_BEGIN]; | 334 return unique_position_fields[field - UNIQUE_POSITION_FIELDS_BEGIN]; |
335 } | 335 } |
| 336 inline sync_pb::AttachmentMetadata& mutable_ref( |
| 337 AttachmentMetadataField field) { |
| 338 return attachment_metadata_fields[field - ATTACHMENT_METADATA_FIELDS_BEGIN]; |
| 339 } |
336 | 340 |
337 ModelType GetModelType() const; | 341 ModelType GetModelType() const; |
338 ModelType GetServerModelType() const; | 342 ModelType GetServerModelType() const; |
339 bool ShouldMaintainPosition() const; | 343 bool ShouldMaintainPosition() const; |
340 | 344 |
341 // Dumps all kernel info into a DictionaryValue and returns it. | 345 // Dumps all kernel info into a DictionaryValue and returns it. |
342 // Transfers ownership of the DictionaryValue to the caller. | 346 // Transfers ownership of the DictionaryValue to the caller. |
343 // Note: |cryptographer| is an optional parameter for use in decrypting | 347 // Note: |cryptographer| is an optional parameter for use in decrypting |
344 // encrypted specifics. If it is NULL or the specifics are not decryptsble, | 348 // encrypted specifics. If it is NULL or the specifics are not decryptsble, |
345 // they will be serialized as empty proto's. | 349 // they will be serialized as empty proto's. |
(...skipping 28 matching lines...) Expand all Loading... |
374 const EntryKernelMutation& mutation); | 378 const EntryKernelMutation& mutation); |
375 | 379 |
376 // Caller owns the return value. | 380 // Caller owns the return value. |
377 base::ListValue* EntryKernelMutationMapToValue( | 381 base::ListValue* EntryKernelMutationMapToValue( |
378 const EntryKernelMutationMap& mutations); | 382 const EntryKernelMutationMap& mutations); |
379 | 383 |
380 } // namespace syncable | 384 } // namespace syncable |
381 } // namespace syncer | 385 } // namespace syncer |
382 | 386 |
383 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 387 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
OLD | NEW |