Index: components/sync/engine_impl/attachments/attachment_downloader_impl.cc |
diff --git a/components/sync/engine_impl/attachments/attachment_downloader_impl.cc b/components/sync/engine_impl/attachments/attachment_downloader_impl.cc |
index 2135d6b20291fdee8b03849735d49173ad5d71a2..7835c2fe1add8e28e95e3bedcc39f0ec6b81a434 100644 |
--- a/components/sync/engine_impl/attachments/attachment_downloader_impl.cc |
+++ b/components/sync/engine_impl/attachments/attachment_downloader_impl.cc |
@@ -9,6 +9,7 @@ |
#include "base/base64.h" |
#include "base/bind.h" |
#include "base/location.h" |
+#include "base/memory/ptr_util.h" |
#include "base/metrics/histogram.h" |
#include "base/metrics/histogram_macros.h" |
#include "base/metrics/sparse_histogram.h" |
@@ -239,8 +240,8 @@ void AttachmentDownloaderImpl::ReportResult( |
iter != download_state.user_callbacks.end(); ++iter) { |
std::unique_ptr<Attachment> attachment; |
if (result == DOWNLOAD_SUCCESS) { |
- attachment.reset(new Attachment(Attachment::CreateFromParts( |
- download_state.attachment_id, attachment_data))); |
+ attachment = base::MakeUnique<Attachment>(Attachment::CreateFromParts( |
+ download_state.attachment_id, attachment_data)); |
} |
base::ThreadTaskRunnerHandle::Get()->PostTask( |