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 #include "sync/api/attachments/attachment.h" | 5 #include "sync/api/attachments/attachment.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 #include "sync/internal_api/public/attachments/attachment_util.h" | 10 #include "sync/internal_api/public/attachments/attachment_util.h" |
9 | 11 |
10 namespace syncer { | 12 namespace syncer { |
11 | 13 |
12 Attachment::~Attachment() {} | 14 Attachment::~Attachment() {} |
13 | 15 |
14 // Static. | 16 // Static. |
15 Attachment Attachment::Create( | 17 Attachment Attachment::Create( |
16 const scoped_refptr<base::RefCountedMemory>& data) { | 18 const scoped_refptr<base::RefCountedMemory>& data) { |
(...skipping 19 matching lines...) Expand all Loading... |
36 } | 38 } |
37 | 39 |
38 Attachment::Attachment(const AttachmentId& id, | 40 Attachment::Attachment(const AttachmentId& id, |
39 const scoped_refptr<base::RefCountedMemory>& data) | 41 const scoped_refptr<base::RefCountedMemory>& data) |
40 : id_(id), data_(data) { | 42 : id_(id), data_(data) { |
41 DCHECK_EQ(id.GetSize(), data->size()); | 43 DCHECK_EQ(id.GetSize(), data->size()); |
42 DCHECK(data.get()); | 44 DCHECK(data.get()); |
43 } | 45 } |
44 | 46 |
45 } // namespace syncer | 47 } // namespace syncer |
OLD | NEW |