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

Unified Diff: third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_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
Index: third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
diff --git a/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc b/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
index c933a00e29a11fa9cbed2fa23a1fb66a0d94a6f1..b441fd5eec691b5ed866685e1af05502c8bae4a8 100644
--- a/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
+++ b/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
@@ -7,6 +7,7 @@
#include <stdint.h>
#include "base/files/file_util.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "platform/loader/fetch/MemoryCache.h"
#include "platform/testing/TestingPlatformSupport.h"
@@ -32,9 +33,9 @@ WebURLLoaderMockFactoryImpl::WebURLLoaderMockFactoryImpl(
WebURLLoaderMockFactoryImpl::~WebURLLoaderMockFactoryImpl() {}
-WebURLLoader* WebURLLoaderMockFactoryImpl::CreateURLLoader(
- WebURLLoader* default_loader) {
- return new WebURLLoaderMock(this, default_loader);
+std::unique_ptr<WebURLLoader> WebURLLoaderMockFactoryImpl::CreateURLLoader(
+ std::unique_ptr<WebURLLoader> default_loader) {
+ return base::MakeUnique<WebURLLoaderMock>(this, std::move(default_loader));
}
void WebURLLoaderMockFactoryImpl::RegisterURL(const WebURL& url,

Powered by Google App Engine
This is Rietveld 408576698