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

Unified Diff: sync/api/attachments/fake_attachment_service.cc

Issue 263903004: Add AttachmentUploader interface and fake implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 7 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
« no previous file with comments | « sync/api/attachments/fake_attachment_service.h ('k') | sync/api/attachments/fake_attachment_uploader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/api/attachments/fake_attachment_service.cc
diff --git a/sync/api/attachments/fake_attachment_service.cc b/sync/api/attachments/fake_attachment_service.cc
index 5cb01e5d1ba3ec01b7968e4a514db4cab785ba49..f86f380f01d658e91a8354f3ffe6c504fbad4db0 100644
--- a/sync/api/attachments/fake_attachment_service.cc
+++ b/sync/api/attachments/fake_attachment_service.cc
@@ -8,14 +8,19 @@
#include "base/message_loop/message_loop.h"
#include "sync/api/attachments/attachment.h"
#include "sync/api/attachments/fake_attachment_store.h"
+#include "sync/api/attachments/fake_attachment_uploader.h"
namespace syncer {
FakeAttachmentService::FakeAttachmentService(
- scoped_ptr<AttachmentStore> attachment_store)
- : attachment_store_(attachment_store.Pass()), weak_ptr_factory_(this) {
+ scoped_ptr<AttachmentStore> attachment_store,
+ scoped_ptr<AttachmentUploader> attachment_uploader)
+ : attachment_store_(attachment_store.Pass()),
+ attachment_uploader_(attachment_uploader.Pass()),
+ weak_ptr_factory_(this) {
DCHECK(CalledOnValidThread());
DCHECK(attachment_store_);
+ DCHECK(attachment_uploader_);
}
FakeAttachmentService::~FakeAttachmentService() {
@@ -26,8 +31,11 @@ FakeAttachmentService::~FakeAttachmentService() {
scoped_ptr<syncer::AttachmentService> FakeAttachmentService::CreateForTest() {
scoped_ptr<syncer::AttachmentStore> attachment_store(
new syncer::FakeAttachmentStore(base::MessageLoopProxy::current()));
+ scoped_ptr<AttachmentUploader> attachment_uploader(
+ new FakeAttachmentUploader);
scoped_ptr<syncer::AttachmentService> attachment_service(
- new syncer::FakeAttachmentService(attachment_store.Pass()));
+ new syncer::FakeAttachmentService(attachment_store.Pass(),
+ attachment_uploader.Pass()));
return attachment_service.Pass();
}
« no previous file with comments | « sync/api/attachments/fake_attachment_service.h ('k') | sync/api/attachments/fake_attachment_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698