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

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

Issue 2316573002: PlzNavigate: Support ResourceTiming API (Closed)
Patch Set: Rebase Created 4 years, 2 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 9ffda130f9a6269750adf1986684de86c4f86368..86ecc509c8296a0ece3b827f3ca1c284734be170 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
@@ -97,6 +97,7 @@ ResourceResponse::ResourceResponse()
m_serviceWorkerResponseType(WebServiceWorkerResponseTypeDefault),
m_responseTime(0),
m_remotePort(0),
+ m_encodedDataLength(0),
m_encodedBodyLength(0),
m_decodedBodyLength(0) {}
@@ -138,6 +139,7 @@ ResourceResponse::ResourceResponse(const KURL& url,
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;
@@ -252,6 +255,7 @@ std::unique_ptr<CrossThreadResourceResponseData> ResourceResponse::copyData()
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();
@@ -595,11 +599,15 @@ void ResourceResponse::setResourceLoadInfo(
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;
}
@@ -615,6 +623,11 @@ void ResourceResponse::setDownloadedFilePath(const String& downloadedFilePath) {
m_downloadedFileHandle = BlobDataHandle::create(std::move(blobData), -1);
}
+void ResourceResponse::appendRedirectResponse(
+ const ResourceResponse& response) {
+ m_redirectResponses.append(response);
+}
+
bool ResourceResponse::compare(const ResourceResponse& a,
const ResourceResponse& b) {
if (a.isNull() != b.isNull())

Powered by Google App Engine
This is Rietveld 408576698