Commit ab7cdd7f authored by yhirano's avatar yhirano Committed by Commit bot

Remove ResourceLoaderInfo::encodedDataLength

It is redundant as we have the field in ResourceResponse.

BUG=666217

Review-Url: https://codereview.chromium.org/2521483002
Cr-Commit-Position: refs/heads/master@{#434875}
parent 2029f370
......@@ -1102,7 +1102,6 @@ void WebURLLoaderImpl::PopulateURLResponse(const GURL& url,
load_info.setHTTPStatusCode(info.devtools_info->http_status_code);
load_info.setHTTPStatusText(WebString::fromLatin1(
info.devtools_info->http_status_text));
load_info.setEncodedDataLength(info.encoded_data_length);
load_info.setRequestHeadersText(WebString::fromLatin1(
info.devtools_info->request_headers_text));
......
......@@ -363,10 +363,7 @@ buildObjectForResourceResponse(const ResourceResponse& response,
else
headersMap = response.httpHeaderFields();
int64_t encodedDataLength =
response.resourceLoadInfo()
? response.resourceLoadInfo()->encodedDataLength
: -1;
int64_t encodedDataLength = response.encodedDataLength();
String securityState = protocol::Security::SecurityStateEnum::Unknown;
switch (response.getSecurityStyle()) {
......
......@@ -210,10 +210,7 @@ void NetworkResourcesData::responseReceived(const String& requestId,
resourceData->setMimeType(response.mimeType());
resourceData->setTextEncodingName(response.textEncodingName());
resourceData->setHTTPStatusCode(response.httpStatusCode());
resourceData->setRawHeaderSize(
response.resourceLoadInfo()
? response.resourceLoadInfo()->encodedDataLength
: 0);
resourceData->setRawHeaderSize(response.encodedDataLength());
String filePath = response.downloadedFilePath();
if (!filePath.isEmpty()) {
......
......@@ -75,16 +75,6 @@ void WebHTTPLoadInfo::setHTTPStatusText(const WebString& statusText) {
m_private->httpStatusText = statusText;
}
long long WebHTTPLoadInfo::encodedDataLength() const {
ASSERT(!m_private.isNull());
return m_private->encodedDataLength;
}
void WebHTTPLoadInfo::setEncodedDataLength(long long encodedDataLength) {
ASSERT(!m_private.isNull());
m_private->encodedDataLength = encodedDataLength;
}
static void addHeader(HTTPHeaderMap* map,
const WebString& name,
const WebString& value) {
......
......@@ -32,11 +32,10 @@
namespace blink {
struct ResourceLoadInfo : RefCounted<ResourceLoadInfo> {
ResourceLoadInfo() : httpStatusCode(0), encodedDataLength(-1) {}
ResourceLoadInfo() : httpStatusCode(0) {}
int httpStatusCode;
String httpStatusText;
long long encodedDataLength;
HTTPHeaderMap requestHeaders;
HTTPHeaderMap responseHeaders;
String requestHeadersText;
......
......@@ -59,9 +59,6 @@ class WebHTTPLoadInfo {
BLINK_PLATFORM_EXPORT WebString httpStatusText() const;
BLINK_PLATFORM_EXPORT void setHTTPStatusText(const WebString&);
BLINK_PLATFORM_EXPORT long long encodedDataLength() const;
BLINK_PLATFORM_EXPORT void setEncodedDataLength(long long);
BLINK_PLATFORM_EXPORT void addRequestHeader(const WebString& name,
const WebString& value);
BLINK_PLATFORM_EXPORT void addResponseHeader(const WebString& name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment