This source file includes following definitions.
- CreateForTest
- GetOrDownloadAttachments
- DropAttachments
- OnSyncDataAdd
- OnSyncDataDelete
- OnSyncDataUpdate
#include "sync/api/attachments/fake_attachment_service.h"
#include "base/test/test_simple_task_runner.h"
#include "sync/api/attachments/fake_attachment_store.h"
namespace syncer {
FakeAttachmentService::FakeAttachmentService(
scoped_ptr<AttachmentStore> attachment_store)
: attachment_store_(attachment_store.Pass()) {
DCHECK(CalledOnValidThread());
DCHECK(attachment_store_);
}
FakeAttachmentService::~FakeAttachmentService() {
DCHECK(CalledOnValidThread());
}
scoped_ptr<syncer::AttachmentService> FakeAttachmentService::CreateForTest() {
scoped_ptr<syncer::AttachmentStore> attachment_store(
new syncer::FakeAttachmentStore(scoped_refptr<base::SequencedTaskRunner>(
new base::TestSimpleTaskRunner)));
scoped_ptr<syncer::AttachmentService> attachment_service(
new syncer::FakeAttachmentService(attachment_store.Pass()));
return attachment_service.Pass();
}
void FakeAttachmentService::GetOrDownloadAttachments(
const AttachmentIdList& attachment_ids,
const GetOrDownloadCallback& callback) {
DCHECK(CalledOnValidThread());
}
void FakeAttachmentService::DropAttachments(
const AttachmentIdList& attachment_ids,
const DropCallback& callback) {
DCHECK(CalledOnValidThread());
}
void FakeAttachmentService::OnSyncDataAdd(const SyncData& sync_data) {
DCHECK(CalledOnValidThread());
}
void FakeAttachmentService::OnSyncDataDelete(const SyncData& sync_data) {
DCHECK(CalledOnValidThread());
}
void FakeAttachmentService::OnSyncDataUpdate(
const AttachmentIdList& old_attachment_ids,
const SyncData& updated_sync_data) {
DCHECK(CalledOnValidThread());
}
}