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

Unified Diff: content/shell/browser/layout_test/test_info_extractor.cc

Issue 1851933002: Convert //url to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixup 7 Created 4 years, 9 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
« no previous file with comments | « content/shell/browser/layout_test/test_info_extractor.h ('k') | device/usb/webusb_descriptors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/layout_test/test_info_extractor.cc
diff --git a/content/shell/browser/layout_test/test_info_extractor.cc b/content/shell/browser/layout_test/test_info_extractor.cc
index a3759403c9a9eb0bf6e70f4604e69dd10a6473ff..f2b751d24a3213da18dc64574cedbc03bcd9fb26 100644
--- a/content/shell/browser/layout_test/test_info_extractor.cc
+++ b/content/shell/browser/layout_test/test_info_extractor.cc
@@ -8,6 +8,7 @@
#include "base/base_paths.h"
#include "base/files/file_util.h"
+#include "base/memory/ptr_util.h"
#include "base/path_service.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
@@ -41,7 +42,7 @@ bool GetTestUrlForAndroid(std::string& path_or_url, GURL* url) {
}
#endif // defined(OS_ANDROID)
-scoped_ptr<TestInfo> GetTestInfoFromLayoutTestName(
+std::unique_ptr<TestInfo> GetTestInfoFromLayoutTestName(
const std::string& test_name) {
// A test name is formated like file:///path/to/test'--pixel-test'pixelhash
std::string path_or_url = test_name;
@@ -63,8 +64,8 @@ scoped_ptr<TestInfo> GetTestInfoFromLayoutTestName(
GURL test_url;
#if defined(OS_ANDROID)
if (GetTestUrlForAndroid(path_or_url, &test_url)) {
- return make_scoped_ptr(new TestInfo(test_url, enable_pixel_dumping,
- expected_pixel_hash, base::FilePath()));
+ return base::WrapUnique(new TestInfo(
+ test_url, enable_pixel_dumping, expected_pixel_hash, base::FilePath()));
}
#endif
@@ -98,9 +99,9 @@ scoped_ptr<TestInfo> GetTestInfoFromLayoutTestName(
current_working_directory = local_path.DirName();
else
base::GetCurrentDirectory(&current_working_directory);
- return make_scoped_ptr(new TestInfo(test_url, enable_pixel_dumping,
- expected_pixel_hash,
- current_working_directory));
+ return base::WrapUnique(new TestInfo(test_url, enable_pixel_dumping,
+ expected_pixel_hash,
+ current_working_directory));
}
} // namespace
@@ -121,7 +122,7 @@ TestInfoExtractor::TestInfoExtractor(
TestInfoExtractor::~TestInfoExtractor() {}
-scoped_ptr<TestInfo> TestInfoExtractor::GetNextTest() {
+std::unique_ptr<TestInfo> TestInfoExtractor::GetNextTest() {
if (cmdline_position_ >= cmdline_args_.size())
return nullptr;
« no previous file with comments | « content/shell/browser/layout_test/test_info_extractor.h ('k') | device/usb/webusb_descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698