Index: third_party/crashpad/crashpad/minidump/minidump_misc_info_writer_test.cc |
diff --git a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer_test.cc |
index 2b5dbe448acf9d301076c77622f28e243804d171..490170e59868ccb142d29374f60fa31c10f90371 100644 |
--- a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer_test.cc |
+++ b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer_test.cc |
@@ -12,20 +12,20 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#include "minidump/minidump_misc_info_writer.h" |
- |
#include <string.h> |
+#include <memory> |
#include <string> |
#include <utility> |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
-#include "base/memory/scoped_ptr.h" |
+#include "base/memory/ptr_util.h" |
#include "base/strings/string16.h" |
#include "base/strings/utf_string_conversions.h" |
#include "gtest/gtest.h" |
#include "minidump/minidump_file_writer.h" |
+#include "minidump/minidump_misc_info_writer.h" |
#include "minidump/test/minidump_file_writer_test_util.h" |
#include "minidump/test/minidump_writable_test_util.h" |
#include "snapshot/test/test_process_snapshot.h" |
@@ -165,7 +165,7 @@ void ExpectMiscInfoEqual<MINIDUMP_MISC_INFO_4>( |
TEST(MinidumpMiscInfoWriter, Empty) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
minidump_file_writer.AddStream(std::move(misc_info_writer)); |
@@ -182,7 +182,7 @@ TEST(MinidumpMiscInfoWriter, Empty) { |
TEST(MinidumpMiscInfoWriter, ProcessId) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kProcessId = 12345; |
@@ -205,7 +205,7 @@ TEST(MinidumpMiscInfoWriter, ProcessId) { |
TEST(MinidumpMiscInfoWriter, ProcessTimes) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const time_t kProcessCreateTime = 0x15252f00; |
const uint32_t kProcessUserTime = 10; |
@@ -233,7 +233,7 @@ TEST(MinidumpMiscInfoWriter, ProcessTimes) { |
TEST(MinidumpMiscInfoWriter, ProcessorPowerInfo) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kProcessorMaxMhz = 2800; |
const uint32_t kProcessorCurrentMhz = 2300; |
@@ -268,7 +268,7 @@ TEST(MinidumpMiscInfoWriter, ProcessorPowerInfo) { |
TEST(MinidumpMiscInfoWriter, ProcessIntegrityLevel) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kProcessIntegrityLevel = 0x2000; |
@@ -291,7 +291,7 @@ TEST(MinidumpMiscInfoWriter, ProcessIntegrityLevel) { |
TEST(MinidumpMiscInfoWriter, ProcessExecuteFlags) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kProcessExecuteFlags = 0x13579bdf; |
@@ -314,7 +314,7 @@ TEST(MinidumpMiscInfoWriter, ProcessExecuteFlags) { |
TEST(MinidumpMiscInfoWriter, ProtectedProcess) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kProtectedProcess = 1; |
@@ -337,7 +337,7 @@ TEST(MinidumpMiscInfoWriter, ProtectedProcess) { |
TEST(MinidumpMiscInfoWriter, TimeZone) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kTimeZoneId = 2; |
const int32_t kBias = 300; |
@@ -394,7 +394,7 @@ TEST(MinidumpMiscInfoWriter, TimeZoneStringsOverflow) { |
// to the widths of their fields. |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kTimeZoneId = 2; |
const int32_t kBias = 300; |
@@ -452,7 +452,7 @@ TEST(MinidumpMiscInfoWriter, TimeZoneStringsOverflow) { |
TEST(MinidumpMiscInfoWriter, BuildStrings) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const char kBuildString[] = "build string"; |
const char kDebugBuildString[] = "debug build string"; |
@@ -487,7 +487,7 @@ TEST(MinidumpMiscInfoWriter, BuildStringsOverflow) { |
// widths of their fields. |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
MINIDUMP_MISC_INFO_4 tmp; |
ALLOW_UNUSED_LOCAL(tmp); |
@@ -521,7 +521,7 @@ TEST(MinidumpMiscInfoWriter, BuildStringsOverflow) { |
TEST(MinidumpMiscInfoWriter, Everything) { |
MinidumpFileWriter minidump_file_writer; |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
const uint32_t kProcessId = 12345; |
const time_t kProcessCreateTime = 0x15252f00; |
@@ -686,7 +686,7 @@ TEST(MinidumpMiscInfoWriter, InitializeFromSnapshot) { |
process_snapshot.SetProcessStartTime(kStartTime); |
process_snapshot.SetProcessCPUTimes(kUserCPUTime, kSystemCPUTime); |
- auto system_snapshot = make_scoped_ptr(new TestSystemSnapshot()); |
+ auto system_snapshot = base::WrapUnique(new TestSystemSnapshot()); |
const uint64_t kHzPerMHz = static_cast<uint64_t>(1E6); |
system_snapshot->SetCPUFrequency( |
expect_misc_info.ProcessorCurrentMhz * kHzPerMHz, |
@@ -702,7 +702,7 @@ TEST(MinidumpMiscInfoWriter, InitializeFromSnapshot) { |
process_snapshot.SetSystem(std::move(system_snapshot)); |
- auto misc_info_writer = make_scoped_ptr(new MinidumpMiscInfoWriter()); |
+ auto misc_info_writer = base::WrapUnique(new MinidumpMiscInfoWriter()); |
misc_info_writer->InitializeFromSnapshot(&process_snapshot); |
MinidumpFileWriter minidump_file_writer; |