summaryrefslogtreecommitdiffstats
path: root/sync/syncable/entry_kernel.h
diff options
context:
space:
mode:
authormaniscalco@chromium.org <maniscalco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 20:25:10 +0000
committermaniscalco@chromium.org <maniscalco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 20:25:10 +0000
commit8a7212c3b470701715e5ebbcfc34851e58124923 (patch)
treeecd5fba81ed965ec63e46cb0b2c39488bf9eca12 /sync/syncable/entry_kernel.h
parentd566841b1f1d5d05438973713312997595659009 (diff)
downloadchromium_src-8a7212c3b470701715e5ebbcfc34851e58124923.zip
chromium_src-8a7212c3b470701715e5ebbcfc34851e58124923.tar.gz
chromium_src-8a7212c3b470701715e5ebbcfc34851e58124923.tar.bz2
Keep track of which attachments are referenced by which sync entries.
PutAttachmentMetadata on MutableEntry now notifies the Directory when the attachments associated with an entry change. Give Directory::InitializeIndices a ScopedKernelLock to be consistent and make it easier to ensure we are locking when we need to. GenericChangeProcess passes new attachments to AttachmentService for storage and upload. Add an output parameter to GenericChangeProcessor's HandleActionAdd and HandleActionUpdate methods so they can keep track of potentially new attachments and pass them to AttachmentService for storage/upload. Convert AttachmentService's OnSyncDataAdd to StoreAttachments. Implement HasAttachmentNotOnServer. BUG=348625,353303,354530,356266 Review URL: https://codereview.chromium.org/247983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable/entry_kernel.h')
-rw-r--r--sync/syncable/entry_kernel.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sync/syncable/entry_kernel.h b/sync/syncable/entry_kernel.h
index b6bc2ab..6380420 100644
--- a/sync/syncable/entry_kernel.h
+++ b/sync/syncable/entry_kernel.h
@@ -333,6 +333,10 @@ struct SYNC_EXPORT_PRIVATE EntryKernel {
inline UniquePosition& mutable_ref(UniquePositionField field) {
return unique_position_fields[field - UNIQUE_POSITION_FIELDS_BEGIN];
}
+ inline sync_pb::AttachmentMetadata& mutable_ref(
+ AttachmentMetadataField field) {
+ return attachment_metadata_fields[field - ATTACHMENT_METADATA_FIELDS_BEGIN];
+ }
ModelType GetModelType() const;
ModelType GetServerModelType() const;