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

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

Issue 1539843002: Convert Pass()→std::move() in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up Created 5 years 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
« no previous file with comments | « no previous file | sync/api/fake_syncable_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/api/attachments/attachment_store.cc
diff --git a/sync/api/attachments/attachment_store.cc b/sync/api/attachments/attachment_store.cc
index 9f09de3b34c12155796438978498f0dc3f108b41..b8566a5032487e434692d99cad63754fb3a83baa 100644
--- a/sync/api/attachments/attachment_store.cc
+++ b/sync/api/attachments/attachment_store.cc
@@ -4,6 +4,8 @@
#include "sync/api/attachments/attachment_store.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
@@ -59,7 +61,7 @@ scoped_ptr<AttachmentStoreForSync>
AttachmentStore::CreateAttachmentStoreForSync() const {
scoped_ptr<AttachmentStoreForSync> attachment_store_for_sync(
new AttachmentStoreForSync(frontend_, component_, SYNC));
- return attachment_store_for_sync.Pass();
+ return attachment_store_for_sync;
}
scoped_ptr<AttachmentStore> AttachmentStore::CreateInMemoryStore() {
@@ -76,10 +78,10 @@ scoped_ptr<AttachmentStore> AttachmentStore::CreateInMemoryStore() {
scoped_ptr<AttachmentStoreBackend> backend(
new InMemoryAttachmentStore(runner));
scoped_refptr<AttachmentStoreFrontend> frontend(
- new AttachmentStoreFrontend(backend.Pass(), runner));
+ new AttachmentStoreFrontend(std::move(backend), runner));
scoped_ptr<AttachmentStore> attachment_store(
new AttachmentStore(frontend, MODEL_TYPE));
- return attachment_store.Pass();
+ return attachment_store;
}
scoped_ptr<AttachmentStore> AttachmentStore::CreateOnDiskStore(
@@ -90,12 +92,12 @@ scoped_ptr<AttachmentStore> AttachmentStore::CreateOnDiskStore(
new OnDiskAttachmentStore(base::ThreadTaskRunnerHandle::Get(), path));
scoped_refptr<AttachmentStoreFrontend> frontend =
- new AttachmentStoreFrontend(backend.Pass(), backend_task_runner);
+ new AttachmentStoreFrontend(std::move(backend), backend_task_runner);
scoped_ptr<AttachmentStore> attachment_store(
new AttachmentStore(frontend, MODEL_TYPE));
frontend->Init(callback);
- return attachment_store.Pass();
+ return attachment_store;
}
scoped_ptr<AttachmentStore> AttachmentStore::CreateMockStoreForTest(
@@ -103,10 +105,10 @@ scoped_ptr<AttachmentStore> AttachmentStore::CreateMockStoreForTest(
scoped_refptr<base::SingleThreadTaskRunner> runner =
base::ThreadTaskRunnerHandle::Get();
scoped_refptr<AttachmentStoreFrontend> attachment_store_frontend(
- new AttachmentStoreFrontend(backend.Pass(), runner));
+ new AttachmentStoreFrontend(std::move(backend), runner));
scoped_ptr<AttachmentStore> attachment_store(
new AttachmentStore(attachment_store_frontend, MODEL_TYPE));
- return attachment_store.Pass();
+ return attachment_store;
}
AttachmentStoreForSync::AttachmentStoreForSync(
« no previous file with comments | « no previous file | sync/api/fake_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698