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

Side by Side Diff: sync/internal_api/attachments/attachment_service_proxy.cc

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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/internal_api/public/attachments/attachment_service_proxy.h" 5 #include "sync/internal_api/public/attachments/attachment_service_proxy.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 "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 10
11 namespace syncer { 11 namespace syncer {
12 12
13 namespace { 13 namespace {
14 14
15 // These ProxyFooCallback functions are used to invoke a callback in a specific 15 // These ProxyFooCallback functions are used to invoke a callback in a specific
16 // thread. 16 // thread.
17 17
18 // Invokes |callback| with |result| and |attachments| in the |task_runner| 18 // Invokes |callback| with |result| and |attachments| in the |task_runner|
19 // thread. 19 // thread.
20 void ProxyGetOrDownloadCallback( 20 void ProxyGetOrDownloadCallback(
21 const scoped_refptr<base::SequencedTaskRunner>& task_runner, 21 const scoped_refptr<base::SequencedTaskRunner>& task_runner,
22 const AttachmentService::GetOrDownloadCallback& callback, 22 const AttachmentService::GetOrDownloadCallback& callback,
23 const AttachmentService::GetOrDownloadResult& result, 23 const AttachmentService::GetOrDownloadResult& result,
24 scoped_ptr<AttachmentMap> attachments) { 24 std::unique_ptr<AttachmentMap> attachments) {
25 task_runner->PostTask( 25 task_runner->PostTask(
26 FROM_HERE, base::Bind(callback, result, base::Passed(&attachments))); 26 FROM_HERE, base::Bind(callback, result, base::Passed(&attachments)));
27 } 27 }
28 28
29 } // namespace 29 } // namespace
30 30
31 AttachmentServiceProxy::AttachmentServiceProxy() { 31 AttachmentServiceProxy::AttachmentServiceProxy() {
32 } 32 }
33 33
34 AttachmentServiceProxy::AttachmentServiceProxy( 34 AttachmentServiceProxy::AttachmentServiceProxy(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 void AttachmentServiceProxy::Core::UploadAttachments( 96 void AttachmentServiceProxy::Core::UploadAttachments(
97 const AttachmentIdList& attachment_ids) { 97 const AttachmentIdList& attachment_ids) {
98 if (!wrapped_) { 98 if (!wrapped_) {
99 return; 99 return;
100 } 100 }
101 wrapped_->UploadAttachments(attachment_ids); 101 wrapped_->UploadAttachments(attachment_ids);
102 } 102 }
103 103
104 } // namespace syncer 104 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698