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

Unified Diff: third_party/crashpad/crashpad/minidump/minidump_module_crashpad_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_module_crashpad_info_writer_test.cc
diff --git a/third_party/crashpad/crashpad/minidump/minidump_module_crashpad_info_writer_test.cc b/third_party/crashpad/crashpad/minidump/minidump_module_crashpad_info_writer_test.cc
index 07f44c14d88d39904dc798ea2cf5ff362859c0f0..99386207715b310eb01c717d41542860d93b911d 100644
--- a/third_party/crashpad/crashpad/minidump/minidump_module_crashpad_info_writer_test.cc
+++ b/third_party/crashpad/crashpad/minidump/minidump_module_crashpad_info_writer_test.cc
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "minidump/minidump_module_crashpad_info_writer.h"
-
-#include <windows.h>
#include <dbghelp.h>
+#include <windows.h>
#include <utility>
+#include "base/memory/ptr_util.h"
#include "gtest/gtest.h"
#include "minidump/minidump_extensions.h"
+#include "minidump/minidump_module_crashpad_info_writer.h"
#include "minidump/minidump_simple_string_dictionary_writer.h"
#include "minidump/test/minidump_file_writer_test_util.h"
#include "minidump/test/minidump_string_writer_test_util.h"
@@ -60,7 +60,7 @@ TEST(MinidumpModuleCrashpadInfoWriter, EmptyList) {
StringFile string_file;
auto module_list_writer =
- make_scoped_ptr(new MinidumpModuleCrashpadInfoListWriter());
+ base::WrapUnique(new MinidumpModuleCrashpadInfoListWriter());
EXPECT_FALSE(module_list_writer->IsUseful());
EXPECT_TRUE(module_list_writer->WriteEverything(&string_file));
@@ -76,8 +76,8 @@ TEST(MinidumpModuleCrashpadInfoWriter, EmptyModule) {
StringFile string_file;
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());
EXPECT_FALSE(module_writer->IsUseful());
module_list_writer->AddModule(std::move(module_writer), 0);
@@ -116,16 +116,17 @@ TEST(MinidumpModuleCrashpadInfoWriter, FullModule) {
StringFile string_file;
auto module_list_writer =
- make_scoped_ptr(new MinidumpModuleCrashpadInfoListWriter());
+ base::WrapUnique(new MinidumpModuleCrashpadInfoListWriter());
- auto module_writer = make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter());
- auto string_list_writer = make_scoped_ptr(new MinidumpUTF8StringListWriter());
+ auto module_writer = base::WrapUnique(new MinidumpModuleCrashpadInfoWriter());
+ auto string_list_writer =
+ base::WrapUnique(new MinidumpUTF8StringListWriter());
string_list_writer->InitializeFromVector(vector);
module_writer->SetListAnnotations(std::move(string_list_writer));
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));
@@ -205,14 +206,14 @@ TEST(MinidumpModuleCrashpadInfoWriter, ThreeModules) {
StringFile string_file;
auto module_list_writer =
- make_scoped_ptr(new MinidumpModuleCrashpadInfoListWriter());
+ base::WrapUnique(new MinidumpModuleCrashpadInfoListWriter());
auto module_writer_0 =
- make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter());
+ base::WrapUnique(new MinidumpModuleCrashpadInfoWriter());
auto simple_string_dictionary_writer_0 =
- make_scoped_ptr(new MinidumpSimpleStringDictionaryWriter());
+ base::WrapUnique(new MinidumpSimpleStringDictionaryWriter());
auto simple_string_dictionary_entry_writer_0 =
- make_scoped_ptr(new MinidumpSimpleStringDictionaryEntryWriter());
+ base::WrapUnique(new MinidumpSimpleStringDictionaryEntryWriter());
simple_string_dictionary_entry_writer_0->SetKeyValue(kKey0, kValue0);
simple_string_dictionary_writer_0->AddEntry(
std::move(simple_string_dictionary_entry_writer_0));
@@ -223,22 +224,22 @@ TEST(MinidumpModuleCrashpadInfoWriter, ThreeModules) {
kMinidumpModuleListIndex0);
auto module_writer_1 =
- make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter());
+ base::WrapUnique(new MinidumpModuleCrashpadInfoWriter());
EXPECT_FALSE(module_writer_1->IsUseful());
module_list_writer->AddModule(std::move(module_writer_1),
kMinidumpModuleListIndex1);
auto module_writer_2 =
- make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter());
+ base::WrapUnique(new MinidumpModuleCrashpadInfoWriter());
auto simple_string_dictionary_writer_2 =
- make_scoped_ptr(new MinidumpSimpleStringDictionaryWriter());
+ base::WrapUnique(new MinidumpSimpleStringDictionaryWriter());
auto simple_string_dictionary_entry_writer_2a =
- make_scoped_ptr(new MinidumpSimpleStringDictionaryEntryWriter());
+ base::WrapUnique(new MinidumpSimpleStringDictionaryEntryWriter());
simple_string_dictionary_entry_writer_2a->SetKeyValue(kKey2A, kValue2A);
simple_string_dictionary_writer_2->AddEntry(
std::move(simple_string_dictionary_entry_writer_2a));
auto simple_string_dictionary_entry_writer_2b =
- make_scoped_ptr(new MinidumpSimpleStringDictionaryEntryWriter());
+ base::WrapUnique(new MinidumpSimpleStringDictionaryEntryWriter());
simple_string_dictionary_entry_writer_2b->SetKeyValue(kKey2B, kValue2B);
simple_string_dictionary_writer_2->AddEntry(
std::move(simple_string_dictionary_entry_writer_2b));
@@ -374,7 +375,7 @@ TEST(MinidumpModuleCrashpadInfoWriter, InitializeFromSnapshot) {
module_snapshots.push_back(&module_snapshot_3);
auto module_list_writer =
- make_scoped_ptr(new MinidumpModuleCrashpadInfoListWriter());
+ base::WrapUnique(new MinidumpModuleCrashpadInfoListWriter());
module_list_writer->InitializeFromSnapshot(module_snapshots);
EXPECT_TRUE(module_list_writer->IsUseful());

Powered by Google App Engine
This is Rietveld 408576698