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

Unified Diff: sync/api/attachments/attachment_store.h

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/api/attachments/attachment_store.h
diff --git a/sync/api/attachments/attachment_store.h b/sync/api/attachments/attachment_store.h
index 0e4d9bba00935a1ad23d309c953c9b4aaa98c954..6c86b5c13a5c2521173cb9738dc6daf731709091 100644
--- a/sync/api/attachments/attachment_store.h
+++ b/sync/api/attachments/attachment_store.h
@@ -5,10 +5,11 @@
#ifndef SYNC_API_ATTACHMENTS_ATTACHMENT_STORE_H_
#define SYNC_API_ATTACHMENTS_ATTACHMENT_STORE_H_
+#include <memory>
+
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "sync/api/attachments/attachment.h"
#include "sync/api/attachments/attachment_id.h"
#include "sync/api/attachments/attachment_metadata.h"
@@ -59,12 +60,13 @@ class SYNC_EXPORT AttachmentStore {
typedef base::Callback<void(const Result&)> InitCallback;
typedef base::Callback<void(const Result&,
- scoped_ptr<AttachmentMap>,
- scoped_ptr<AttachmentIdList>)> ReadCallback;
+ std::unique_ptr<AttachmentMap>,
+ std::unique_ptr<AttachmentIdList>)>
+ ReadCallback;
typedef base::Callback<void(const Result&)> WriteCallback;
typedef base::Callback<void(const Result&)> DropCallback;
typedef base::Callback<void(const Result&,
- scoped_ptr<AttachmentMetadataList>)>
+ std::unique_ptr<AttachmentMetadataList>)>
ReadMetadataCallback;
~AttachmentStore();
@@ -124,11 +126,11 @@ class SYNC_EXPORT AttachmentStore {
// Given current AttachmentStore (this) creates separate AttachmentStore that
// will be used by sync components (AttachmentService). Resulting
// AttachmentStore is backed by the same frontend/backend.
- scoped_ptr<AttachmentStoreForSync> CreateAttachmentStoreForSync() const;
+ std::unique_ptr<AttachmentStoreForSync> CreateAttachmentStoreForSync() const;
// Creates an AttachmentStore backed by in-memory implementation of attachment
// store. For now frontend lives on the same thread as backend.
- static scoped_ptr<AttachmentStore> CreateInMemoryStore();
+ static std::unique_ptr<AttachmentStore> CreateInMemoryStore();
// Creates an AttachmentStore backed by on-disk implementation of attachment
// store. Opens corresponding leveldb database located at |path|. All backend
@@ -137,7 +139,7 @@ class SYNC_EXPORT AttachmentStore {
// that called CreateOnDiskStore. Calling Read/Write/Drop before
// initialization completed is allowed. Later if initialization fails these
// operations will fail with STORE_INITIALIZATION_FAILED error.
- static scoped_ptr<AttachmentStore> CreateOnDiskStore(
+ static std::unique_ptr<AttachmentStore> CreateOnDiskStore(
const base::FilePath& path,
const scoped_refptr<base::SequencedTaskRunner>& backend_task_runner,
const InitCallback& callback);
@@ -145,8 +147,8 @@ class SYNC_EXPORT AttachmentStore {
// Creates set of AttachmentStore/AttachmentStoreFrontend instances for tests
// that provide their own implementation of AttachmentstoreBackend for
// mocking.
- static scoped_ptr<AttachmentStore> CreateMockStoreForTest(
- scoped_ptr<AttachmentStoreBackend> backend);
+ static std::unique_ptr<AttachmentStore> CreateMockStoreForTest(
+ std::unique_ptr<AttachmentStoreBackend> backend);
protected:
AttachmentStore(const scoped_refptr<AttachmentStoreFrontend>& frontend,

Powered by Google App Engine
This is Rietveld 408576698