Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: sync/internal_api/public/attachments/attachment_service_impl.h

Issue 538403004: Revert of Replace AttachmentStore's StoreAttachments with UploadAttachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/public/attachments/attachment_service_impl.h
diff --git a/sync/internal_api/public/attachments/attachment_service_impl.h b/sync/internal_api/public/attachments/attachment_service_impl.h
index 1fa0c546cb58fa69686250b69f263794b99a8855..53f688982b8fdd77b6945580dae2aec22159d311 100644
--- a/sync/internal_api/public/attachments/attachment_service_impl.h
+++ b/sync/internal_api/public/attachments/attachment_service_impl.h
@@ -4,8 +4,6 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_
-
-#include <deque>
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -45,14 +43,13 @@
static scoped_ptr<syncer::AttachmentService> CreateForTest();
// AttachmentService implementation.
- virtual AttachmentStore* GetStore() OVERRIDE;
- virtual void GetOrDownloadAttachments(
- const AttachmentIdList& attachment_ids,
- const GetOrDownloadCallback& callback) OVERRIDE;
+ virtual void GetOrDownloadAttachments(const AttachmentIdList& attachment_ids,
+ const GetOrDownloadCallback& callback)
+ OVERRIDE;
virtual void DropAttachments(const AttachmentIdList& attachment_ids,
const DropCallback& callback) OVERRIDE;
- virtual void UploadAttachments(
- const AttachmentIdSet& attachment_ids) OVERRIDE;
+ virtual void StoreAttachments(const AttachmentList& attachments,
+ const StoreCallback& callback) OVERRIDE;
private:
class GetOrDownloadState;
@@ -63,17 +60,14 @@
scoped_ptr<AttachmentIdList> unavailable_attachment_ids);
void DropDone(const DropCallback& callback,
const AttachmentStore::Result& result);
+ void WriteDone(const StoreCallback& callback,
+ const AttachmentStore::Result& result);
void UploadDone(const AttachmentUploader::UploadResult& result,
const AttachmentId& attachment_id);
void DownloadDone(const scoped_refptr<GetOrDownloadState>& state,
const AttachmentId& attachment_id,
const AttachmentDownloader::DownloadResult& result,
scoped_ptr<Attachment> attachment);
- void ProcessQueuedUploads();
- void ReadDoneNowUpload(
- const AttachmentStore::Result& result,
- scoped_ptr<AttachmentMap> attachments,
- scoped_ptr<AttachmentIdList> unavailable_attachment_ids);
const scoped_ptr<AttachmentStore> attachment_store_;
@@ -86,13 +80,6 @@
// May be null.
Delegate* delegate_;
- // Queue of attachment ids to be uploaded. Every entry in this queue should
- // also exist in ids_in_queue_.
- std::deque<AttachmentId> queue_;
-
- // Ids of attachments currently being uploaded or queued for upload.
- AttachmentIdSet ids_in_queue_;
-
// Must be last data member.
base::WeakPtrFactory<AttachmentServiceImpl> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698