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

Unified Diff: third_party/crashpad/crashpad/minidump/minidump_system_info_writer_test.cc

Issue 1911823002: Convert //third_party from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update crashpad's README.chromium Created 4 years, 8 months 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
Index: third_party/crashpad/crashpad/minidump/minidump_system_info_writer_test.cc
diff --git a/third_party/crashpad/crashpad/minidump/minidump_system_info_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_system_info_writer_test.cc
index 08f36f6532c3e5e7f2c812658c84bc4ce4954be6..1f4d6790e6a2061345e99269bbbabeedaca2a7fb 100644
--- a/third_party/crashpad/crashpad/minidump/minidump_system_info_writer_test.cc
+++ b/third_party/crashpad/crashpad/minidump/minidump_system_info_writer_test.cc
@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "minidump/minidump_system_info_writer.h"
-
#include <string.h>
#include <algorithm>
@@ -21,8 +19,10 @@
#include <utility>
#include "base/compiler_specific.h"
+#include "base/memory/ptr_util.h"
#include "gtest/gtest.h"
#include "minidump/minidump_file_writer.h"
+#include "minidump/minidump_system_info_writer.h"
#include "minidump/test/minidump_file_writer_test_util.h"
#include "minidump/test/minidump_string_writer_test_util.h"
#include "minidump/test/minidump_writable_test_util.h"
@@ -77,7 +77,7 @@ void GetSystemInfoStream(const std::string& file_contents,
TEST(MinidumpSystemInfoWriter, Empty) {
MinidumpFileWriter minidump_file_writer;
- auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
+ auto system_info_writer = base::WrapUnique(new MinidumpSystemInfoWriter());
system_info_writer->SetCSDVersion(std::string());
@@ -117,7 +117,7 @@ TEST(MinidumpSystemInfoWriter, Empty) {
TEST(MinidumpSystemInfoWriter, X86_Win) {
MinidumpFileWriter minidump_file_writer;
- auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
+ auto system_info_writer = base::WrapUnique(new MinidumpSystemInfoWriter());
const MinidumpCPUArchitecture kCPUArchitecture = kMinidumpCPUArchitectureX86;
const uint16_t kCPULevel = 0x0010;
@@ -187,7 +187,7 @@ TEST(MinidumpSystemInfoWriter, X86_Win) {
TEST(MinidumpSystemInfoWriter, AMD64_Mac) {
MinidumpFileWriter minidump_file_writer;
- auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
+ auto system_info_writer = base::WrapUnique(new MinidumpSystemInfoWriter());
const MinidumpCPUArchitecture kCPUArchitecture =
kMinidumpCPUArchitectureAMD64;
@@ -244,7 +244,7 @@ TEST(MinidumpSystemInfoWriter, X86_CPUVendorFromRegisters) {
// This test exercises SetCPUX86Vendor() to set the vendor from register
// values.
MinidumpFileWriter minidump_file_writer;
- auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
+ auto system_info_writer = base::WrapUnique(new MinidumpSystemInfoWriter());
const MinidumpCPUArchitecture kCPUArchitecture = kMinidumpCPUArchitectureX86;
const uint32_t kCPUVendor[] = {'uneG', 'Ieni', 'letn'};
@@ -330,7 +330,7 @@ TEST(MinidumpSystemInfoWriter, InitializeFromSnapshot_X86) {
expect_system_info.BuildNumber,
kOSVersionBuild);
- auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
+ auto system_info_writer = base::WrapUnique(new MinidumpSystemInfoWriter());
system_info_writer->InitializeFromSnapshot(&system_snapshot);
MinidumpFileWriter minidump_file_writer;
@@ -425,7 +425,7 @@ TEST(MinidumpSystemInfoWriter, InitializeFromSnapshot_AMD64) {
kOSVersionBuild);
system_snapshot.SetNXEnabled(true);
- auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
+ auto system_info_writer = base::WrapUnique(new MinidumpSystemInfoWriter());
system_info_writer->InitializeFromSnapshot(&system_snapshot);
MinidumpFileWriter minidump_file_writer;
@@ -466,7 +466,7 @@ TEST(MinidumpSystemInfoWriter, InitializeFromSnapshot_AMD64) {
TEST(MinidumpSystemInfoWriterDeathTest, NoCSDVersion) {
MinidumpFileWriter minidump_file_writer;
- auto system_info_writer = make_scoped_ptr(new MinidumpSystemInfoWriter());
+ auto system_info_writer = base::WrapUnique(new MinidumpSystemInfoWriter());
minidump_file_writer.AddStream(std::move(system_info_writer));
StringFile string_file;

Powered by Google App Engine
This is Rietveld 408576698