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 SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_ |
7 | 7 |
8 #include <memory> | |
Nicolas Zea
2016/04/07 21:48:58
not needed?
| |
9 | |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "sync/api/attachments/attachment.h" | 11 #include "sync/api/attachments/attachment.h" |
11 #include "sync/base/sync_export.h" | 12 #include "sync/base/sync_export.h" |
12 | 13 |
13 namespace syncer { | 14 namespace syncer { |
14 | 15 |
15 // AttachmentUploader is responsible for uploading attachments to the server. | 16 // AttachmentUploader is responsible for uploading attachments to the server. |
16 class SYNC_EXPORT AttachmentUploader { | 17 class SYNC_EXPORT AttachmentUploader { |
17 public: | 18 public: |
18 // The result of an UploadAttachment operation. | 19 // The result of an UploadAttachment operation. |
19 enum UploadResult { | 20 enum UploadResult { |
(...skipping 16 matching lines...) Expand all Loading... | |
36 // | 37 // |
37 // |callback| will receive an UploadResult code and the AttachmentId of the | 38 // |callback| will receive an UploadResult code and the AttachmentId of the |
38 // newly uploaded attachment. | 39 // newly uploaded attachment. |
39 virtual void UploadAttachment(const Attachment& attachment, | 40 virtual void UploadAttachment(const Attachment& attachment, |
40 const UploadCallback& callback) = 0; | 41 const UploadCallback& callback) = 0; |
41 }; | 42 }; |
42 | 43 |
43 } // namespace syncer | 44 } // namespace syncer |
44 | 45 |
45 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_ | 46 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_ |
OLD | NEW |