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

Unified Diff: sync/internal_api/attachments/fake_attachment_downloader.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/attachments/fake_attachment_downloader.cc
diff --git a/sync/internal_api/attachments/fake_attachment_downloader.cc b/sync/internal_api/attachments/fake_attachment_downloader.cc
deleted file mode 100644
index d55e07661cf179a9697dfb846c049c70ec2d822c..0000000000000000000000000000000000000000
--- a/sync/internal_api/attachments/fake_attachment_downloader.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sync/internal_api/public/attachments/fake_attachment_downloader.h"
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/single_thread_task_runner.h"
-#include "base/threading/thread_task_runner_handle.h"
-#include "sync/internal_api/public/attachments/attachment_util.h"
-
-namespace syncer {
-
-FakeAttachmentDownloader::FakeAttachmentDownloader() {
-}
-
-FakeAttachmentDownloader::~FakeAttachmentDownloader() {
- DCHECK(CalledOnValidThread());
-}
-
-void FakeAttachmentDownloader::DownloadAttachment(
- const AttachmentId& attachment_id,
- const DownloadCallback& callback) {
- DCHECK(CalledOnValidThread());
- // This is happy fake downloader, it always successfully downloads empty
- // attachment.
- scoped_refptr<base::RefCountedMemory> data(new base::RefCountedBytes());
- std::unique_ptr<Attachment> attachment;
- attachment.reset(
- new Attachment(Attachment::CreateFromParts(attachment_id, data)));
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE,
- base::Bind(callback, DOWNLOAD_SUCCESS, base::Passed(&attachment)));
-}
-
-} // namespace syncer
« no previous file with comments | « sync/internal_api/attachments/attachment_util.cc ('k') | sync/internal_api/attachments/fake_attachment_downloader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698