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

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

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
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..fc42caaa728bb042aeae6444453ad09326fa3ed9 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
@@ -62,6 +62,8 @@ ResourceResponse::ResourceResponse()
, m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault)
, m_responseTime(0)
, m_remotePort(0)
+ , m_encodedBodyLength(0)
+ , m_responseBodySize(0)
{
}
@@ -98,6 +100,8 @@ ResourceResponse::ResourceResponse(const KURL& url, const AtomicString& mimeType
, m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault)
, m_responseTime(0)
, m_remotePort(0)
+ , m_encodedBodyLength(0)
+ , m_responseBodySize(0)
{
}
@@ -143,6 +147,8 @@ ResourceResponse::ResourceResponse(CrossThreadResourceResponseData* data)
m_responseTime = data->m_responseTime;
m_remoteIPAddress = AtomicString(data->m_remoteIPAddress);
m_remotePort = data->m_remotePort;
+ m_encodedBodyLength = data->m_encodedBodyLength;
+ m_responseBodySize = data->m_responseBodySize;
m_downloadedFilePath = data->m_downloadedFilePath;
m_downloadedFileHandle = data->m_downloadedFileHandle;
@@ -191,6 +197,8 @@ 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_encodedBodyLength = m_encodedBodyLength;
+ data->m_responseBodySize = m_responseBodySize;
data->m_downloadedFilePath = m_downloadedFilePath.isolatedCopy();
data->m_downloadedFileHandle = m_downloadedFileHandle;
@@ -537,6 +545,16 @@ void ResourceResponse::setResourceLoadInfo(PassRefPtr<ResourceLoadInfo> loadInfo
m_resourceLoadInfo = loadInfo;
}
+void ResourceResponse::addToEncodedBodyLength(int value)
+{
+ m_encodedBodyLength += value;
+}
+
+void ResourceResponse::addToResponseBodySize(int value)
+{
+ m_responseBodySize += value;
+}
+
void ResourceResponse::setDownloadedFilePath(const String& downloadedFilePath)
{
m_downloadedFilePath = downloadedFilePath;
@@ -574,6 +592,10 @@ bool ResourceResponse::compare(const ResourceResponse& a, const ResourceResponse
return true;
if (a.resourceLoadTiming() != b.resourceLoadTiming())
return false;
+ if (a.encodedBodyLength() != b.encodedBodyLength())
+ return false;
+ if (a.responseBodySize() != b.responseBodySize())
+ return false;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698