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

Unified Diff: sync/internal_api/model_type_store_backend_unittest.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 | « sync/internal_api/model_type_store_backend.cc ('k') | sync/internal_api/model_type_store_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/model_type_store_backend_unittest.cc
diff --git a/sync/internal_api/model_type_store_backend_unittest.cc b/sync/internal_api/model_type_store_backend_unittest.cc
index d84d831821acd958a4ed8eefa379fea84023a173..4cc5aab8e6ff6a8b28ded1914e5d86374d9a1bf1 100644
--- a/sync/internal_api/model_type_store_backend_unittest.cc
+++ b/sync/internal_api/model_type_store_backend_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/model_type_store_backend.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -28,7 +30,7 @@ class ModelTypeStoreBackendTest : public testing::Test {
path += "/test_db";
ModelTypeStore::Result result = backend->Init(path, in_memory_env_.get());
EXPECT_EQ(ModelTypeStore::Result::SUCCESS, result);
- return backend.Pass();
+ return backend;
}
protected:
@@ -44,7 +46,7 @@ TEST_F(ModelTypeStoreBackendTest, WriteThenRead) {
scoped_ptr<leveldb::WriteBatch> write_batch(new leveldb::WriteBatch());
write_batch->Put("prefix:id1", "data1");
ModelTypeStore::Result result =
- backend->WriteModifications(write_batch.Pass());
+ backend->WriteModifications(std::move(write_batch));
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
// Read all records with prefix.
@@ -73,7 +75,7 @@ TEST_F(ModelTypeStoreBackendTest, ReadAllRecordsWithPrefix) {
write_batch->Put("prefix1:id1", "data1");
write_batch->Put("prefix2:id2", "data2");
ModelTypeStore::Result result =
- backend->WriteModifications(write_batch.Pass());
+ backend->WriteModifications(std::move(write_batch));
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
ModelTypeStore::RecordList record_list;
@@ -94,7 +96,7 @@ TEST_F(ModelTypeStoreBackendTest, ReadDeletedRecord) {
write_batch->Put("prefix:id1", "data1");
write_batch->Put("prefix:id2", "data2");
ModelTypeStore::Result result =
- backend->WriteModifications(write_batch.Pass());
+ backend->WriteModifications(std::move(write_batch));
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
ModelTypeStore::IdList id_list;
@@ -111,7 +113,7 @@ TEST_F(ModelTypeStoreBackendTest, ReadDeletedRecord) {
// Delete one record.
write_batch.reset(new leveldb::WriteBatch());
write_batch->Delete("prefix:id2");
- result = backend->WriteModifications(write_batch.Pass());
+ result = backend->WriteModifications(std::move(write_batch));
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
// Ensure deleted record id is returned in missing_id_list.
« no previous file with comments | « sync/internal_api/model_type_store_backend.cc ('k') | sync/internal_api/model_type_store_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698