| Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| index eab81dfc836a538acdaf0291f87ac3260501e80a..10c60eda830d0a198ca1c3660c425b4f5e18046e 100644
|
| --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
| @@ -77,6 +77,7 @@
|
| #include "wtf/Assertions.h"
|
| #include "wtf/StdLibExtras.h"
|
| #include "wtf/text/CString.h"
|
| +#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -334,7 +335,7 @@ Blob* XMLHttpRequest::responseBlob()
|
| // copying the bytes between the browser and the renderer.
|
| m_responseBlob = Blob::create(createBlobDataHandleFromResponse());
|
| } else {
|
| - OwnPtr<BlobData> blobData = BlobData::create();
|
| + std::unique_ptr<BlobData> blobData = BlobData::create();
|
| size_t size = 0;
|
| if (m_binaryResponseBuilder && m_binaryResponseBuilder->size()) {
|
| size = m_binaryResponseBuilder->size();
|
| @@ -1023,7 +1024,7 @@ bool XMLHttpRequest::internalAbort()
|
| // If, window.onload contains open() and send(), m_loader will be set to
|
| // non 0 value. So, we cannot continue the outer open(). In such case,
|
| // just abort the outer open() by returning false.
|
| - OwnPtr<ThreadableLoader> loader = std::move(m_loader);
|
| + std::unique_ptr<ThreadableLoader> loader = std::move(m_loader);
|
| loader->cancel();
|
|
|
| // If abort() called internalAbort() and a nested open() ended up
|
| @@ -1436,7 +1437,7 @@ void XMLHttpRequest::didFailLoadingFromBlob()
|
| PassRefPtr<BlobDataHandle> XMLHttpRequest::createBlobDataHandleFromResponse()
|
| {
|
| ASSERT(m_downloadingToFile);
|
| - OwnPtr<BlobData> blobData = BlobData::create();
|
| + std::unique_ptr<BlobData> blobData = BlobData::create();
|
| String filePath = m_response.downloadedFilePath();
|
| // If we errored out or got no data, we return an empty handle.
|
| if (!filePath.isEmpty() && m_lengthDownloadedToFile) {
|
| @@ -1509,7 +1510,7 @@ void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon
|
| }
|
| }
|
|
|
| -void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle)
|
| +void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const ResourceResponse& response, std::unique_ptr<WebDataConsumerHandle> handle)
|
| {
|
| ASSERT_UNUSED(handle, !handle);
|
| WTF_LOG(Network, "XMLHttpRequest %p didReceiveResponse(%lu)", this, identifier);
|
| @@ -1544,7 +1545,7 @@ void XMLHttpRequest::parseDocumentChunk(const char* data, unsigned len)
|
| m_responseDocumentParser->appendBytes(data, len);
|
| }
|
|
|
| -PassOwnPtr<TextResourceDecoder> XMLHttpRequest::createDecoder() const
|
| +std::unique_ptr<TextResourceDecoder> XMLHttpRequest::createDecoder() const
|
| {
|
| if (m_responseTypeCode == ResponseTypeJSON)
|
| return TextResourceDecoder::create("application/json", "UTF-8");
|
| @@ -1554,7 +1555,7 @@ PassOwnPtr<TextResourceDecoder> XMLHttpRequest::createDecoder() const
|
|
|
| // allow TextResourceDecoder to look inside the m_response if it's XML or HTML
|
| if (responseIsXML()) {
|
| - OwnPtr<TextResourceDecoder> decoder = TextResourceDecoder::create("application/xml");
|
| + std::unique_ptr<TextResourceDecoder> decoder = TextResourceDecoder::create("application/xml");
|
| // Don't stop on encoding errors, unlike it is done for other kinds
|
| // of XML resources. This matches the behavior of previous WebKit
|
| // versions, Firefox and Opera.
|
|
|