| 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_ENGINE_ATTACHMENTS_ATTACHMENT_DOWNLOADER_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_ATTACHMENTS_ATTACHMENT_DOWNLOADER_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_ATTACHMENTS_ATTACHMENT_DOWNLOADER_H_ | 6 #define COMPONENTS_SYNC_ENGINE_ATTACHMENTS_ATTACHMENT_DOWNLOADER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 typedef base::Callback<void(const DownloadResult&, | 33 typedef base::Callback<void(const DownloadResult&, |
| 34 std::unique_ptr<Attachment>)> | 34 std::unique_ptr<Attachment>)> |
| 35 DownloadCallback; | 35 DownloadCallback; |
| 36 | 36 |
| 37 virtual ~AttachmentDownloader(); | 37 virtual ~AttachmentDownloader(); |
| 38 | 38 |
| 39 // Download attachment referred by |attachment_id| and invoke |callback| when | 39 // Download attachment referred by |attachment_id| and invoke |callback| when |
| 40 // done. | 40 // done. |
| 41 // | 41 // |
| 42 // |callback| will receive a DownloadResult code and an Attachment object. If | 42 // |callback| will receive a DownloadResult code and an Attachment object. If |
| 43 // DownloadResult is not DOWNLOAD_SUCCESS then attachment pointer is NULL. | 43 // DownloadResult is not DOWNLOAD_SUCCESS then attachment pointer is null. |
| 44 virtual void DownloadAttachment(const AttachmentId& attachment_id, | 44 virtual void DownloadAttachment(const AttachmentId& attachment_id, |
| 45 const DownloadCallback& callback) = 0; | 45 const DownloadCallback& callback) = 0; |
| 46 | 46 |
| 47 // Create an instance of AttachmentDownloader. | 47 // Create an instance of AttachmentDownloader. |
| 48 // | 48 // |
| 49 // |sync_service_url| is the URL of the sync service. | 49 // |sync_service_url| is the URL of the sync service. |
| 50 // | 50 // |
| 51 // |url_request_context_getter| provides a URLRequestContext. | 51 // |url_request_context_getter| provides a URLRequestContext. |
| 52 // | 52 // |
| 53 // |account_id| is the account id to use for downloads. | 53 // |account_id| is the account id to use for downloads. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 67 const OAuth2TokenService::ScopeSet scopes, | 67 const OAuth2TokenService::ScopeSet scopes, |
| 68 const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>& | 68 const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>& |
| 69 token_service_provider, | 69 token_service_provider, |
| 70 const std::string& store_birthday, | 70 const std::string& store_birthday, |
| 71 ModelType model_type); | 71 ModelType model_type); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace syncer | 74 } // namespace syncer |
| 75 | 75 |
| 76 #endif // COMPONENTS_SYNC_ENGINE_ATTACHMENTS_ATTACHMENT_DOWNLOADER_H_ | 76 #endif // COMPONENTS_SYNC_ENGINE_ATTACHMENTS_ATTACHMENT_DOWNLOADER_H_ |
| OLD | NEW |