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 } | |
340 | 336 |
341 ModelType GetModelType() const; | 337 ModelType GetModelType() const; |
342 ModelType GetServerModelType() const; | 338 ModelType GetServerModelType() const; |
343 bool ShouldMaintainPosition() const; | 339 bool ShouldMaintainPosition() const; |
344 | 340 |
345 // Dumps all kernel info into a DictionaryValue and returns it. | 341 // Dumps all kernel info into a DictionaryValue and returns it. |
346 // Transfers ownership of the DictionaryValue to the caller. | 342 // Transfers ownership of the DictionaryValue to the caller. |
347 // Note: |cryptographer| is an optional parameter for use in decrypting | 343 // Note: |cryptographer| is an optional parameter for use in decrypting |
348 // encrypted specifics. If it is NULL or the specifics are not decryptsble, | 344 // encrypted specifics. If it is NULL or the specifics are not decryptsble, |
349 // they will be serialized as empty proto's. | 345 // they will be serialized as empty proto's. |
(...skipping 28 matching lines...) Expand all Loading... |
378 const EntryKernelMutation& mutation); | 374 const EntryKernelMutation& mutation); |
379 | 375 |
380 // Caller owns the return value. | 376 // Caller owns the return value. |
381 base::ListValue* EntryKernelMutationMapToValue( | 377 base::ListValue* EntryKernelMutationMapToValue( |
382 const EntryKernelMutationMap& mutations); | 378 const EntryKernelMutationMap& mutations); |
383 | 379 |
384 } // namespace syncable | 380 } // namespace syncable |
385 } // namespace syncer | 381 } // namespace syncer |
386 | 382 |
387 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_ | 383 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_ |
OLD | NEW |