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

Unified Diff: minidump/minidump_memory_writer_test.cc

Issue 1483073004: Replace use of .Pass() with crashpad::move(). (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: pass: . 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 | « minidump/minidump_memory_writer.cc ('k') | minidump/minidump_misc_info_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_memory_writer_test.cc
diff --git a/minidump/minidump_memory_writer_test.cc b/minidump/minidump_memory_writer_test.cc
index 6292ea0a1f7a2772acf8a2285f5654b07e62be9c..38d3cb28b575453ac06a4b3b36efda014cc7cd08 100644
--- a/minidump/minidump_memory_writer_test.cc
+++ b/minidump/minidump_memory_writer_test.cc
@@ -30,6 +30,7 @@
#include "minidump/test/minidump_writable_test_util.h"
#include "snapshot/test/test_memory_snapshot.h"
#include "util/file/string_file.h"
+#include "util/stdlib/move.h"
#include "util/stdlib/pointer_container.h"
namespace crashpad {
@@ -80,7 +81,7 @@ TEST(MinidumpMemoryWriter, EmptyMemoryList) {
MinidumpFileWriter minidump_file_writer;
auto memory_list_writer = make_scoped_ptr(new MinidumpMemoryListWriter());
- minidump_file_writer.AddStream(memory_list_writer.Pass());
+ minidump_file_writer.AddStream(crashpad::move(memory_list_writer));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -106,9 +107,9 @@ TEST(MinidumpMemoryWriter, OneMemoryRegion) {
auto memory_writer = make_scoped_ptr(
new TestMinidumpMemoryWriter(kBaseAddress, kSize, kValue));
- memory_list_writer->AddMemory(memory_writer.Pass());
+ memory_list_writer->AddMemory(crashpad::move(memory_writer));
- minidump_file_writer.AddStream(memory_list_writer.Pass());
+ minidump_file_writer.AddStream(crashpad::move(memory_list_writer));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -144,12 +145,12 @@ TEST(MinidumpMemoryWriter, TwoMemoryRegions) {
auto memory_writer_0 = make_scoped_ptr(
new TestMinidumpMemoryWriter(kBaseAddress0, kSize0, kValue0));
- memory_list_writer->AddMemory(memory_writer_0.Pass());
+ memory_list_writer->AddMemory(crashpad::move(memory_writer_0));
auto memory_writer_1 = make_scoped_ptr(
new TestMinidumpMemoryWriter(kBaseAddress1, kSize1, kValue1));
- memory_list_writer->AddMemory(memory_writer_1.Pass());
+ memory_list_writer->AddMemory(crashpad::move(memory_writer_1));
- minidump_file_writer.AddStream(memory_list_writer.Pass());
+ minidump_file_writer.AddStream(crashpad::move(memory_list_writer));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -248,7 +249,7 @@ TEST(MinidumpMemoryWriter, ExtraMemory) {
auto memory_list_writer = make_scoped_ptr(new MinidumpMemoryListWriter());
memory_list_writer->AddExtraMemory(test_memory_stream->memory());
- minidump_file_writer.AddStream(test_memory_stream.Pass());
+ minidump_file_writer.AddStream(crashpad::move(test_memory_stream));
const uint64_t kBaseAddress1 = 0x2000;
const size_t kSize1 = 0x0400;
@@ -256,9 +257,9 @@ TEST(MinidumpMemoryWriter, ExtraMemory) {
auto memory_writer = make_scoped_ptr(
new TestMinidumpMemoryWriter(kBaseAddress1, kSize1, kValue1));
- memory_list_writer->AddMemory(memory_writer.Pass());
+ memory_list_writer->AddMemory(crashpad::move(memory_writer));
- minidump_file_writer.AddStream(memory_list_writer.Pass());
+ minidump_file_writer.AddStream(crashpad::move(memory_list_writer));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
@@ -336,7 +337,7 @@ TEST(MinidumpMemoryWriter, AddFromSnapshot) {
memory_list_writer->AddFromSnapshot(memory_snapshots);
MinidumpFileWriter minidump_file_writer;
- minidump_file_writer.AddStream(memory_list_writer.Pass());
+ minidump_file_writer.AddStream(crashpad::move(memory_list_writer));
StringFile string_file;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&string_file));
« no previous file with comments | « minidump/minidump_memory_writer.cc ('k') | minidump/minidump_misc_info_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698