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

Unified Diff: components/sync/engine/attachments/on_disk_attachment_store.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/engine/attachments/on_disk_attachment_store.cc
diff --git a/components/sync/engine/attachments/on_disk_attachment_store.cc b/components/sync/engine/attachments/on_disk_attachment_store.cc
index e9aa3c00f27fe4e73c5f05f220f26db907b34406..4afc78b5a356559d6dc2386ac8b878b2da46f866 100644
--- a/components/sync/engine/attachments/on_disk_attachment_store.cc
+++ b/components/sync/engine/attachments/on_disk_attachment_store.cc
@@ -12,6 +12,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/sequenced_task_runner.h"
#include "components/sync/engine/attachments/attachment_util.h"
@@ -435,8 +436,8 @@ std::unique_ptr<Attachment> OnDiskAttachmentStore::ReadSingleAttachment(
return attachment;
}
}
- attachment.reset(
- new Attachment(Attachment::CreateFromParts(attachment_id, data)));
+ attachment = base::MakeUnique<Attachment>(
+ Attachment::CreateFromParts(attachment_id, data));
return attachment;
}
« no previous file with comments | « components/sync/engine/attachments/fake_attachment_downloader.cc ('k') | components/sync/engine/fake_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698