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 9dcc19e7939e166d9cfce4c5bd6cee41f54f8668..b9db57d8184b6e343b9b1bafb7a359218fe8ab4d 100644 |
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp |
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp |
@@ -103,6 +103,7 @@ ResourceResponse::ResourceResponse() |
, m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault) |
, m_responseTime(0) |
, m_remotePort(0) |
+ , m_encodedDataLength(0) |
, m_encodedBodyLength(0) |
, m_decodedBodyLength(0) |
{ |
@@ -142,6 +143,7 @@ ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType |
, m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault) |
, m_responseTime(0) |
, m_remotePort(0) |
+ , m_encodedDataLength(0) |
, m_encodedBodyLength(0) |
, m_decodedBodyLength(0) |
{ |
@@ -188,6 +190,7 @@ ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data) |
m_responseTime = data->m_responseTime; |
m_remoteIPAddress = AtomicString(data->m_remoteIPAddress); |
m_remotePort = data->m_remotePort; |
+ m_encodedDataLength = data->m_encodedDataLength; |
m_encodedBodyLength = data->m_encodedBodyLength; |
m_decodedBodyLength = data->m_decodedBodyLength; |
m_downloadedFilePath = data->m_downloadedFilePath; |
@@ -240,6 +243,7 @@ std::unique_ptr<CrossThreadResourceResponseData> ResourceResponse::copyData() co |
data->m_responseTime = m_responseTime; |
data->m_remoteIPAddress = m_remoteIPAddress.getString().isolatedCopy(); |
data->m_remotePort = m_remotePort; |
+ data->m_encodedDataLength = m_encodedDataLength; |
data->m_encodedBodyLength = m_encodedBodyLength; |
data->m_decodedBodyLength = m_decodedBodyLength; |
data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy(); |
@@ -586,12 +590,17 @@ void ResourceResponse::setResourceLoadInfo(PassRefPtr<ResourceLoadInfo> loadInfo |
m_resourceLoadInfo = loadInfo; |
} |
-void ResourceResponse::addToEncodedBodyLength(int value) |
+void ResourceResponse::addToEncodedDataLength(long long value) |
+{ |
+ m_encodedDataLength += value; |
+} |
+ |
+void ResourceResponse::addToEncodedBodyLength(long long value) |
{ |
m_encodedBodyLength += value; |
} |
-void ResourceResponse::addToDecodedBodyLength(int value) |
+void ResourceResponse::addToDecodedBodyLength(long long value) |
{ |
m_decodedBodyLength += value; |
} |
@@ -609,6 +618,11 @@ void ResourceResponse::setDownloadedFilePath(const String& downloadedFilePath) |
m_downloadedFileHandle = BlobDataHandle::create(std::move(blobData), -1); |
} |
+void ResourceResponse::appendRedirectResponse(const ResourceResponse& response) |
+{ |
+ m_redirectResponses.push_back(response); |
+} |
+ |
bool ResourceResponse::compare(const ResourceResponse& a, const ResourceResponse& b) |
{ |
if (a.isNull() != b.isNull()) |