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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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/core/fetch/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
index 4b28e5c200bc0beaa1cc289c46074e8b82a1f07a..2be163c8007ac3cbd6c698124b132e8482bdc250 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
@@ -44,6 +44,8 @@
#include "public/platform/WebURLResponse.h"
#include "wtf/Assertions.h"
#include "wtf/CurrentTime.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -80,7 +82,7 @@ void ResourceLoader::start(const ResourceRequest& request, WebTaskRunner* loadin
return;
}
- m_loader = adoptPtr(Platform::current()->createURLLoader());
+ m_loader = wrapUnique(Platform::current()->createURLLoader());
m_loader->setDefersLoading(defersLoading);
ASSERT(m_loader);
m_loader->setLoadingTaskRunner(loadingTaskRunner);
@@ -152,14 +154,14 @@ void ResourceLoader::didReceiveResponse(WebURLLoader*, const WebURLResponse& res
{
ASSERT(!response.isNull());
// |rawHandle|'s ownership is transferred to the callee.
- OwnPtr<WebDataConsumerHandle> handle = adoptPtr(rawHandle);
+ std::unique_ptr<WebDataConsumerHandle> handle = wrapUnique(rawHandle);
const ResourceResponse& resourceResponse = response.toResourceResponse();
if (responseNeedsAccessControlCheck()) {
if (response.wasFetchedViaServiceWorker()) {
if (response.wasFallbackRequiredByServiceWorker()) {
m_loader.reset();
- m_loader = adoptPtr(Platform::current()->createURLLoader());
+ m_loader = wrapUnique(Platform::current()->createURLLoader());
ASSERT(m_loader);
ResourceRequest request = m_resource->lastResourceRequest();
ASSERT(!request.skipServiceWorker());
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceLoader.h ('k') | third_party/WebKit/Source/core/fetch/TextResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698