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

Unified Diff: sync/internal_api/attachments/in_memory_attachment_store.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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/attachments/in_memory_attachment_store.cc
diff --git a/sync/internal_api/attachments/in_memory_attachment_store.cc b/sync/internal_api/attachments/in_memory_attachment_store.cc
index b4f834c66390c4cc1b7a441169c9d61ea4c995cb..256a8ab69485065539c1665bf215b6702a372645 100644
--- a/sync/internal_api/attachments/in_memory_attachment_store.cc
+++ b/sync/internal_api/attachments/in_memory_attachment_store.cc
@@ -4,10 +4,11 @@
#include "sync/internal_api/public/attachments/in_memory_attachment_store.h"
+#include <memory>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
-#include "base/memory/scoped_ptr.h"
#include "base/sequenced_task_runner.h"
namespace syncer {
@@ -44,8 +45,9 @@ void InMemoryAttachmentStore::Read(
const AttachmentStore::ReadCallback& callback) {
DCHECK(CalledOnValidThread());
AttachmentStore::Result result_code = AttachmentStore::SUCCESS;
- scoped_ptr<AttachmentMap> result_map(new AttachmentMap);
- scoped_ptr<AttachmentIdList> unavailable_attachments(new AttachmentIdList);
+ std::unique_ptr<AttachmentMap> result_map(new AttachmentMap);
+ std::unique_ptr<AttachmentIdList> unavailable_attachments(
+ new AttachmentIdList);
for (const auto& id : ids) {
AttachmentEntryMap::iterator iter = attachments_.find(id);
@@ -112,7 +114,7 @@ void InMemoryAttachmentStore::ReadMetadataById(
const AttachmentStore::ReadMetadataCallback& callback) {
DCHECK(CalledOnValidThread());
AttachmentStore::Result result_code = AttachmentStore::SUCCESS;
- scoped_ptr<AttachmentMetadataList> metadata_list(
+ std::unique_ptr<AttachmentMetadataList> metadata_list(
new AttachmentMetadataList());
for (const auto& id : ids) {
@@ -136,7 +138,7 @@ void InMemoryAttachmentStore::ReadMetadata(
const AttachmentStore::ReadMetadataCallback& callback) {
DCHECK(CalledOnValidThread());
AttachmentStore::Result result_code = AttachmentStore::SUCCESS;
- scoped_ptr<AttachmentMetadataList> metadata_list(
+ std::unique_ptr<AttachmentMetadataList> metadata_list(
new AttachmentMetadataList());
for (AttachmentEntryMap::const_iterator iter = attachments_.begin();

Powered by Google App Engine
This is Rietveld 408576698