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

Unified Diff: content/test/test_blink_web_unit_test_support.cc

Issue 2831033002: Use unique_ptr for Platform::CreateURLLoader (Closed)
Patch Set: Created 3 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: content/test/test_blink_web_unit_test_support.cc
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc
index 8439a6270d99c82d3b208a17e400228dac5f59d0..50349664235ffdc85142758a54fe5e39cf43dedc 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -188,11 +188,12 @@ blink::WebIDBFactory* TestBlinkWebUnitTestSupport::IdbFactory() {
return NULL;
}
-blink::WebURLLoader* TestBlinkWebUnitTestSupport::CreateURLLoader() {
+std::unique_ptr<blink::WebURLLoader>
+TestBlinkWebUnitTestSupport::CreateURLLoader() {
// This loader should be used only for process-local resources such as
// data URLs.
- blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr, nullptr);
- return url_loader_factory_->CreateURLLoader(default_loader);
+ auto default_loader = base::MakeUnique<WebURLLoaderImpl>(nullptr, nullptr);
+ return url_loader_factory_->CreateURLLoader(std::move(default_loader));
}
blink::WebString TestBlinkWebUnitTestSupport::UserAgent() {
« no previous file with comments | « content/test/test_blink_web_unit_test_support.h ('k') | third_party/WebKit/Source/core/loader/PingLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698