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

Unified Diff: content/renderer/renderer_blink_platform_impl.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
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | content/test/test_blink_web_unit_test_support.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_blink_platform_impl.cc
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 91c24cf38bb048f8898ad6be6802ae052beae83c..4f920ce014b4486e37573161643dec1ac36f3ead 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -302,7 +302,8 @@ void RendererBlinkPlatformImpl::Shutdown() {
//------------------------------------------------------------------------------
-blink::WebURLLoader* RendererBlinkPlatformImpl::CreateURLLoader() {
+std::unique_ptr<blink::WebURLLoader>
+RendererBlinkPlatformImpl::CreateURLLoader() {
ChildThreadImpl* child_thread = ChildThreadImpl::current();
mojom::URLLoaderFactory* factory =
@@ -325,7 +326,7 @@ blink::WebURLLoader* RendererBlinkPlatformImpl::CreateURLLoader() {
// There may be no child thread in RenderViewTests. These tests can still use
// data URLs to bypass the ResourceDispatcher.
- return new content::WebURLLoaderImpl(
+ return base::MakeUnique<WebURLLoaderImpl>(
child_thread ? child_thread->resource_dispatcher() : nullptr, factory);
}
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | content/test/test_blink_web_unit_test_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698