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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceResponse.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/platform/network/ResourceResponse.cpp
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
index 06fa838f14636c0fc0b0fd3743914777936af385..d513f5b144a50f5fdc6c2f8dc0808fa39196a7c0 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
@@ -27,7 +27,9 @@
#include "platform/network/ResourceResponse.h"
#include "wtf/CurrentTime.h"
+#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
+#include <memory>
namespace blink {
@@ -148,9 +150,9 @@ ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data)
// whatever values may be present in the opaque m_extraData structure.
}
-PassOwnPtr<CrossThreadResourceResponseData> ResourceResponse::copyData() const
+std::unique_ptr<CrossThreadResourceResponseData> ResourceResponse::copyData() const
{
- OwnPtr<CrossThreadResourceResponseData> data = adoptPtr(new CrossThreadResourceResponseData);
+ std::unique_ptr<CrossThreadResourceResponseData> data = wrapUnique(new CrossThreadResourceResponseData);
data->m_url = url().copy();
data->m_mimeType = mimeType().getString().isolatedCopy();
data->m_expectedContentLength = expectedContentLength();
@@ -542,7 +544,7 @@ void ResourceResponse::setDownloadedFilePath(const String& downloadedFilePath)
m_downloadedFileHandle.clear();
return;
}
- OwnPtr<BlobData> blobData = BlobData::create();
+ std::unique_ptr<BlobData> blobData = BlobData::create();
blobData->appendFile(m_downloadedFilePath);
blobData->detachFromCurrentThread();
m_downloadedFileHandle = BlobDataHandle::create(std::move(blobData), -1);

Powered by Google App Engine
This is Rietveld 408576698