Chromium Code Reviews| Index: sync/api/attachments/attachment.h |
| diff --git a/sync/api/attachments/attachment.h b/sync/api/attachments/attachment.h |
| index af4c36da70b0f71eb8393c03fc0fa89074d7265d..cb9d12ca51f84c23cd173ed9f35f9b0f8afa8c0a 100644 |
| --- a/sync/api/attachments/attachment.h |
| +++ b/sync/api/attachments/attachment.h |
| @@ -32,15 +32,17 @@ class SYNC_EXPORT Attachment { |
| // Creates an attachment with a unique id and the supplied data. |
| // |
| // Used when creating a brand new attachment. |
| - static Attachment Create(const scoped_refptr<base::RefCountedMemory>& data); |
| + static Attachment CreateNew( |
| + const scoped_refptr<base::RefCountedMemory>& data); |
| // Creates an attachment with the supplied id and data. |
| // |
| // Used when you want to recreate a specific attachment. E.g. creating a local |
| // copy of an attachment that already exists on the sync server. |
| - static Attachment CreateWithId( |
| + static Attachment RestoreExisting( |
|
pavely
2014/11/10 23:45:29
I wanted to generalize name since it is not create
maniscalco
2014/11/11 00:44:53
I see. WDYT about CreateFromParts? Restore in th
pavely
2014/11/11 22:27:14
The reason is Restore means something is broken, d
|
| const AttachmentId& id, |
| - const scoped_refptr<base::RefCountedMemory>& data); |
| + const scoped_refptr<base::RefCountedMemory>& data, |
| + uint32_t crc32c); |
| // Returns this attachment's id. |
| const AttachmentId& GetId() const; |
| @@ -48,12 +50,16 @@ class SYNC_EXPORT Attachment { |
| // Returns this attachment's data. |
| const scoped_refptr<base::RefCountedMemory>& GetData() const; |
| + uint32_t GetCrc32c() const; |
| + |
| private: |
| AttachmentId id_; |
| scoped_refptr<base::RefCountedMemory> data_; |
| + uint32_t crc32c_; |
| Attachment(const AttachmentId& id, |
| - const scoped_refptr<base::RefCountedMemory>& data); |
| + const scoped_refptr<base::RefCountedMemory>& data, |
| + uint32_t crc32c); |
| }; |
| typedef std::vector<syncer::Attachment> AttachmentList; |