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

Unified Diff: base/json/json_writer_unittest.cc

Issue 1479473002: base: Use std::move() instead of Pass() for real movable types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: basepass: missing-include Created 5 years, 1 month 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 | « base/files/memory_mapped_file_unittest.cc ('k') | base/memory/ref_counted.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_writer_unittest.cc
diff --git a/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc
index 0daeafce1d710e91d8942c480b352692b8d39e46..a6f1a18c30e90f83c0beda257011e92469aa305c 100644
--- a/base/json/json_writer_unittest.cc
+++ b/base/json/json_writer_unittest.cc
@@ -57,10 +57,10 @@ TEST(JSONWriterTest, NestedTypes) {
scoped_ptr<ListValue> list(new ListValue());
scoped_ptr<DictionaryValue> inner_dict(new DictionaryValue());
inner_dict->SetInteger("inner int", 10);
- list->Append(inner_dict.Pass());
+ list->Append(std::move(inner_dict));
list->Append(make_scoped_ptr(new ListValue()));
list->AppendBoolean(true);
- root_dict.Set("list", list.Pass());
+ root_dict.Set("list", std::move(list));
// Test the pretty-printer.
EXPECT_TRUE(JSONWriter::Write(root_dict, &output_js));
@@ -92,7 +92,7 @@ TEST(JSONWriterTest, KeysWithPeriods) {
period_dict.SetIntegerWithoutPathExpansion("c", 2);
scoped_ptr<DictionaryValue> period_dict2(new DictionaryValue());
period_dict2->SetIntegerWithoutPathExpansion("g.h.i.j", 1);
- period_dict.SetWithoutPathExpansion("d.e.f", period_dict2.Pass());
+ period_dict.SetWithoutPathExpansion("d.e.f", std::move(period_dict2));
EXPECT_TRUE(JSONWriter::Write(period_dict, &output_js));
EXPECT_EQ("{\"a.b\":3,\"c\":2,\"d.e.f\":{\"g.h.i.j\":1}}", output_js);
« no previous file with comments | « base/files/memory_mapped_file_unittest.cc ('k') | base/memory/ref_counted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698