Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / sync / internal_api / attachments / fake_attachment_uploader.cc
blob1ffbe5b0539f690c75f11ac15a548edfac94323e
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "sync/internal_api/public/attachments/fake_attachment_uploader.h"
7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h"
9 #include "sync/api/attachments/attachment.h"
10 #include "sync/protocol/sync.pb.h"
12 namespace syncer {
14 FakeAttachmentUploader::FakeAttachmentUploader() {
15 DCHECK(CalledOnValidThread());
18 FakeAttachmentUploader::~FakeAttachmentUploader() {
19 DCHECK(CalledOnValidThread());
22 void FakeAttachmentUploader::UploadAttachment(const Attachment& attachment,
23 const UploadCallback& callback) {
24 DCHECK(CalledOnValidThread());
25 DCHECK(!attachment.GetId().GetProto().unique_id().empty());
27 UploadResult result = UPLOAD_SUCCESS;
28 AttachmentId id = attachment.GetId();
29 base::MessageLoop::current()->PostTask(FROM_HERE,
30 base::Bind(callback, result, id));
33 } // namespace syncer