| Index: components/sync/api/attachments/attachment_service.h
|
| diff --git a/components/sync/core/attachments/attachment_service.h b/components/sync/api/attachments/attachment_service.h
|
| similarity index 74%
|
| rename from components/sync/core/attachments/attachment_service.h
|
| rename to components/sync/api/attachments/attachment_service.h
|
| index b59037293dcd382f2f9cd940a85df39bd42edd81..ad1c029d0f9bd8f330f005b369729480e6e3ce0c 100644
|
| --- a/components/sync/core/attachments/attachment_service.h
|
| +++ b/components/sync/api/attachments/attachment_service.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_SERVICE_H_
|
| -#define COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_SERVICE_H_
|
| +#ifndef COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_H_
|
| +#define COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_H_
|
|
|
| #include <memory>
|
|
|
| @@ -13,7 +13,10 @@
|
|
|
| namespace syncer {
|
|
|
| +class AttachmentDownloader;
|
| class AttachmentStore;
|
| +class AttachmentStoreForSync;
|
| +class AttachmentUploader;
|
| class SyncData;
|
|
|
| // AttachmentService is responsible for managing a model type's attachments.
|
| @@ -48,7 +51,18 @@ class AttachmentService {
|
| virtual void OnAttachmentUploaded(const AttachmentId& attachment_id) = 0;
|
| };
|
|
|
| - AttachmentService();
|
| + // Create a concrete AttachmentService.
|
| + static std::unique_ptr<AttachmentService> Create(
|
| + std::unique_ptr<AttachmentStoreForSync> attachment_store,
|
| + std::unique_ptr<AttachmentUploader> attachment_uploader,
|
| + std::unique_ptr<AttachmentDownloader> attachment_downloader,
|
| + Delegate* delegate,
|
| + const base::TimeDelta& initial_backoff_delay,
|
| + const base::TimeDelta& max_backoff_delay);
|
| +
|
| + // Create an AttachmentService suitable for use in tests.
|
| + static std::unique_ptr<AttachmentService> CreateForTest();
|
| +
|
| virtual ~AttachmentService();
|
|
|
| // See SyncData::GetOrDownloadAttachments.
|
| @@ -72,4 +86,4 @@ class AttachmentService {
|
|
|
| } // namespace syncer
|
|
|
| -#endif // COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_SERVICE_H_
|
| +#endif // COMPONENTS_SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_H_
|
|
|