OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sync/api/attachments/fake_attachment_service.h" | 5 #include "sync/api/attachments/fake_attachment_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "sync/api/attachments/attachment.h" | 9 #include "sync/api/attachments/attachment.h" |
10 #include "sync/api/attachments/fake_attachment_store.h" | 10 #include "sync/internal_api/public/attachments/fake_attachment_store.h" |
11 #include "sync/api/attachments/fake_attachment_uploader.h" | 11 #include "sync/internal_api/public/attachments/fake_attachment_uploader.h" |
12 | 12 |
13 namespace syncer { | 13 namespace syncer { |
14 | 14 |
15 FakeAttachmentService::FakeAttachmentService( | 15 FakeAttachmentService::FakeAttachmentService( |
16 scoped_ptr<AttachmentStore> attachment_store, | 16 scoped_ptr<AttachmentStore> attachment_store, |
17 scoped_ptr<AttachmentUploader> attachment_uploader) | 17 scoped_ptr<AttachmentUploader> attachment_uploader) |
18 : attachment_store_(attachment_store.Pass()), | 18 : attachment_store_(attachment_store.Pass()), |
19 attachment_uploader_(attachment_uploader.Pass()), | 19 attachment_uploader_(attachment_uploader.Pass()), |
20 weak_ptr_factory_(this) { | 20 weak_ptr_factory_(this) { |
21 DCHECK(CalledOnValidThread()); | 21 DCHECK(CalledOnValidThread()); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 AttachmentService::STORE_UNSPECIFIED_ERROR; | 118 AttachmentService::STORE_UNSPECIFIED_ERROR; |
119 if (result == AttachmentStore::SUCCESS) { | 119 if (result == AttachmentStore::SUCCESS) { |
120 store_result = AttachmentService::STORE_SUCCESS; | 120 store_result = AttachmentService::STORE_SUCCESS; |
121 } | 121 } |
122 // TODO(maniscalco): Deal with case where an error occurred (bug 361251). | 122 // TODO(maniscalco): Deal with case where an error occurred (bug 361251). |
123 base::MessageLoop::current()->PostTask(FROM_HERE, | 123 base::MessageLoop::current()->PostTask(FROM_HERE, |
124 base::Bind(callback, store_result)); | 124 base::Bind(callback, store_result)); |
125 } | 125 } |
126 | 126 |
127 } // namespace syncer | 127 } // namespace syncer |
OLD | NEW |