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

Unified Diff: sync/internal_api/model_type_store_impl_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_impl.cc ('k') | sync/internal_api/protocol_event_buffer.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_impl_unittest.cc
diff --git a/sync/internal_api/model_type_store_impl_unittest.cc b/sync/internal_api/model_type_store_impl_unittest.cc
index 6f322426b65375715e3eb830a4f22ce4736e69d0..1a01009079c71d977cd8cf6e8012d18347d05ad2 100644
--- a/sync/internal_api/model_type_store_impl_unittest.cc
+++ b/sync/internal_api/model_type_store_impl_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/model_type_store_impl.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -26,7 +28,7 @@ class ModelTypeStoreImplTest : public testing::Test {
void OnInitDone(ModelTypeStore::Result result,
scoped_ptr<ModelTypeStore> store) {
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
- store_ = store.Pass();
+ store_ = std::move(store);
}
void PumpLoop() {
@@ -48,7 +50,7 @@ class ModelTypeStoreImplTest : public testing::Test {
store()->WriteData(write_batch.get(), "id2", "data2");
store()->WriteGlobalMetadata(write_batch.get(), "global_metadata");
ModelTypeStore::Result result;
- store()->CommitWriteBatch(write_batch.Pass(),
+ store()->CommitWriteBatch(std::move(write_batch),
base::Bind(&CaptureResult, &result));
PumpLoop();
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
@@ -68,7 +70,7 @@ class ModelTypeStoreImplTest : public testing::Test {
ModelTypeStore::Result result,
scoped_ptr<ModelTypeStore::RecordList> records) {
*dst_result = result;
- *dst_records = records.Pass();
+ *dst_records = std::move(records);
}
static void CaptureResutRecordsAndString(
@@ -79,7 +81,7 @@ class ModelTypeStoreImplTest : public testing::Test {
scoped_ptr<ModelTypeStore::RecordList> records,
const std::string& value) {
*dst_result = result;
- *dst_records = records.Pass();
+ *dst_records = std::move(records);
*dst_value = value;
}
@@ -91,8 +93,8 @@ class ModelTypeStoreImplTest : public testing::Test {
scoped_ptr<ModelTypeStore::RecordList> records,
scoped_ptr<ModelTypeStore::IdList> missing_id_list) {
*dst_result = result;
- *dst_records = records.Pass();
- *dst_id_list = missing_id_list.Pass();
+ *dst_records = std::move(records);
+ *dst_id_list = std::move(missing_id_list);
}
private:
@@ -168,7 +170,7 @@ TEST_F(ModelTypeStoreImplTest, MissingGlobalMetadata) {
scoped_ptr<ModelTypeStore::WriteBatch> write_batch =
store()->CreateWriteBatch();
store()->DeleteGlobalMetadata(write_batch.get());
- store()->CommitWriteBatch(write_batch.Pass(),
+ store()->CommitWriteBatch(std::move(write_batch),
base::Bind(&CaptureResult, &result));
PumpLoop();
ASSERT_EQ(ModelTypeStore::Result::SUCCESS, result);
« no previous file with comments | « sync/internal_api/model_type_store_impl.cc ('k') | sync/internal_api/protocol_event_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698