| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_API_ATTACHMENTS_ATTACHMENT_H_ | 5 #ifndef COMPONENTS_SYNC_MODEL_ATTACHMENTS_ATTACHMENT_H_ |
| 6 #define COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_H_ | 6 #define COMPONENTS_SYNC_MODEL_ATTACHMENTS_ATTACHMENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/ref_counted_memory.h" | 15 #include "base/memory/ref_counted_memory.h" |
| 16 #include "components/sync/api/attachments/attachment_id.h" | 16 #include "components/sync/model/attachments/attachment_id.h" |
| 17 | 17 |
| 18 namespace syncer { | 18 namespace syncer { |
| 19 | 19 |
| 20 // A blob of in-memory data attached to a sync item. | 20 // A blob of in-memory data attached to a sync item. |
| 21 // | 21 // |
| 22 // While Attachment objects themselves aren't immutable (they are assignable) | 22 // While Attachment objects themselves aren't immutable (they are assignable) |
| 23 // the data they wrap is immutable. | 23 // the data they wrap is immutable. |
| 24 // | 24 // |
| 25 // It is cheap to copy Attachments. Feel free to store and return by value. | 25 // It is cheap to copy Attachments. Feel free to store and return by value. |
| 26 class Attachment { | 26 class Attachment { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 Attachment(const AttachmentId& id, | 62 Attachment(const AttachmentId& id, |
| 63 const scoped_refptr<base::RefCountedMemory>& data); | 63 const scoped_refptr<base::RefCountedMemory>& data); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 typedef std::vector<Attachment> AttachmentList; | 66 typedef std::vector<Attachment> AttachmentList; |
| 67 typedef std::map<AttachmentId, Attachment> AttachmentMap; | 67 typedef std::map<AttachmentId, Attachment> AttachmentMap; |
| 68 | 68 |
| 69 } // namespace syncer | 69 } // namespace syncer |
| 70 | 70 |
| 71 #endif // COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_H_ | 71 #endif // COMPONENTS_SYNC_MODEL_ATTACHMENTS_ATTACHMENT_H_ |
| OLD | NEW |