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

Unified Diff: third_party/WebKit/Source/platform/network/ResourceResponse.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 d513f5b144a50f5fdc6c2f8dc0808fa39196a7c0..06fa838f14636c0fc0b0fd3743914777936af385 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
@@ -27,9 +27,7 @@
#include "platform/network/ResourceResponse.h"
#include "wtf/CurrentTime.h"
-#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
-#include <memory>
namespace blink {
@@ -150,9 +148,9 @@ ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data)
// whatever values may be present in the opaque m_extraData structure.
}
-std::unique_ptr<CrossThreadResourceResponseData> ResourceResponse::copyData() const
+PassOwnPtr<CrossThreadResourceResponseData> ResourceResponse::copyData() const
{
- std::unique_ptr<CrossThreadResourceResponseData> data = wrapUnique(new CrossThreadResourceResponseData);
+ OwnPtr<CrossThreadResourceResponseData> data = adoptPtr(new CrossThreadResourceResponseData);
data->m_url = url().copy();
data->m_mimeType = mimeType().getString().isolatedCopy();
data->m_expectedContentLength = expectedContentLength();
@@ -544,7 +542,7 @@ void ResourceResponse::setDownloadedFilePath(const String& downloadedFilePath)
m_downloadedFileHandle.clear();
return;
}
- std::unique_ptr<BlobData> blobData = BlobData::create();
+ OwnPtr<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