Index: third_party/crashpad/crashpad/minidump/minidump_crashpad_info_writer_test.cc |
diff --git a/third_party/crashpad/crashpad/minidump/minidump_crashpad_info_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_crashpad_info_writer_test.cc |
index d5ff65ceb6979d7a5d81eb0ba48a60f3e6c3a5af..12144295b6d1b17fdb97da4e08d997394518ef68 100644 |
--- a/third_party/crashpad/crashpad/minidump/minidump_crashpad_info_writer_test.cc |
+++ b/third_party/crashpad/crashpad/minidump/minidump_crashpad_info_writer_test.cc |
@@ -12,16 +12,16 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#include "minidump/minidump_crashpad_info_writer.h" |
- |
-#include <windows.h> |
#include <dbghelp.h> |
+#include <windows.h> |
#include <map> |
#include <string> |
#include <utility> |
+#include "base/memory/ptr_util.h" |
#include "gtest/gtest.h" |
+#include "minidump/minidump_crashpad_info_writer.h" |
#include "minidump/minidump_extensions.h" |
#include "minidump/minidump_file_writer.h" |
#include "minidump/minidump_module_crashpad_info_writer.h" |
@@ -65,7 +65,8 @@ void GetCrashpadInfoStream( |
TEST(MinidumpCrashpadInfoWriter, Empty) { |
MinidumpFileWriter minidump_file_writer; |
- auto crashpad_info_writer = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); |
+ auto crashpad_info_writer = |
+ base::WrapUnique(new MinidumpCrashpadInfoWriter()); |
EXPECT_FALSE(crashpad_info_writer->IsUseful()); |
minidump_file_writer.AddStream(std::move(crashpad_info_writer)); |
@@ -89,7 +90,8 @@ TEST(MinidumpCrashpadInfoWriter, Empty) { |
TEST(MinidumpCrashpadInfoWriter, ReportAndClientID) { |
MinidumpFileWriter minidump_file_writer; |
- auto crashpad_info_writer = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); |
+ auto crashpad_info_writer = |
+ base::WrapUnique(new MinidumpCrashpadInfoWriter()); |
UUID report_id; |
ASSERT_TRUE( |
@@ -124,7 +126,8 @@ TEST(MinidumpCrashpadInfoWriter, ReportAndClientID) { |
TEST(MinidumpCrashpadInfoWriter, SimpleAnnotations) { |
MinidumpFileWriter minidump_file_writer; |
- auto crashpad_info_writer = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); |
+ auto crashpad_info_writer = |
+ base::WrapUnique(new MinidumpCrashpadInfoWriter()); |
const char kKey[] = |
"a thing that provides a means of gaining access to or understanding " |
@@ -133,9 +136,9 @@ TEST(MinidumpCrashpadInfoWriter, SimpleAnnotations) { |
"the numerical amount denoted by an algebraic term; a magnitude, " |
"quantity, or number"; |
auto simple_string_dictionary_writer = |
- make_scoped_ptr(new MinidumpSimpleStringDictionaryWriter()); |
+ base::WrapUnique(new MinidumpSimpleStringDictionaryWriter()); |
auto simple_string_dictionary_entry_writer = |
- make_scoped_ptr(new MinidumpSimpleStringDictionaryEntryWriter()); |
+ base::WrapUnique(new MinidumpSimpleStringDictionaryEntryWriter()); |
simple_string_dictionary_entry_writer->SetKeyValue(kKey, kValue); |
simple_string_dictionary_writer->AddEntry( |
std::move(simple_string_dictionary_entry_writer)); |
@@ -173,11 +176,12 @@ TEST(MinidumpCrashpadInfoWriter, CrashpadModuleList) { |
const uint32_t kMinidumpModuleListIndex = 3; |
MinidumpFileWriter minidump_file_writer; |
- auto crashpad_info_writer = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); |
+ auto crashpad_info_writer = |
+ base::WrapUnique(new MinidumpCrashpadInfoWriter()); |
auto module_list_writer = |
- make_scoped_ptr(new MinidumpModuleCrashpadInfoListWriter()); |
- auto module_writer = make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter()); |
+ base::WrapUnique(new MinidumpModuleCrashpadInfoListWriter()); |
+ auto module_writer = base::WrapUnique(new MinidumpModuleCrashpadInfoWriter()); |
module_list_writer->AddModule(std::move(module_writer), |
kMinidumpModuleListIndex); |
crashpad_info_writer->SetModuleList(std::move(module_list_writer)); |
@@ -231,12 +235,12 @@ TEST(MinidumpCrashpadInfoWriter, InitializeFromSnapshot) { |
// Test with a useless module, one that doesn’t carry anything that would |
// require MinidumpCrashpadInfo or any child object. |
- auto process_snapshot = make_scoped_ptr(new TestProcessSnapshot()); |
+ auto process_snapshot = base::WrapUnique(new TestProcessSnapshot()); |
- auto module_snapshot = make_scoped_ptr(new TestModuleSnapshot()); |
+ auto module_snapshot = base::WrapUnique(new TestModuleSnapshot()); |
process_snapshot->AddModule(std::move(module_snapshot)); |
- auto info_writer = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); |
+ auto info_writer = base::WrapUnique(new MinidumpCrashpadInfoWriter()); |
info_writer->InitializeFromSnapshot(process_snapshot.get()); |
EXPECT_FALSE(info_writer->IsUseful()); |