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

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

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.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.h b/third_party/WebKit/Source/platform/network/ResourceResponse.h
index f2e59acca07cfd62e99c2159f0b5708ffac51ccc..49324615967e23b69f5c00ee4cf26f10d9486fc1 100644
--- a/third_party/WebKit/Source/platform/network/ResourceResponse.h
+++ b/third_party/WebKit/Source/platform/network/ResourceResponse.h
@@ -325,11 +325,14 @@ class PLATFORM_EXPORT ResourceResponse final {
unsigned short remotePort() const { return m_remotePort; }
void setRemotePort(unsigned short value) { m_remotePort = value; }
+ long long encodedDataLength() const { return m_encodedDataLength; }
+ void addToEncodedDataLength(long long value);
+
long long encodedBodyLength() const { return m_encodedBodyLength; }
- void addToEncodedBodyLength(int value);
+ void addToEncodedBodyLength(long long value);
long long decodedBodyLength() const { return m_decodedBodyLength; }
- void addToDecodedBodyLength(int value);
+ void addToDecodedBodyLength(long long value);
const String& downloadedFilePath() const { return m_downloadedFilePath; }
void setDownloadedFilePath(const String&);
@@ -345,6 +348,14 @@ class PLATFORM_EXPORT ResourceResponse final {
return 1280;
}
+ // PlzNavigate: Even if there is redirections, only one
+ // ResourceResponse is built: the final response.
+ // The redirect response chain can be accessed by this function.
+ const Vector<ResourceResponse>& redirectResponses() const {
+ return m_redirectResponses;
+ }
+ void appendRedirectResponse(const ResourceResponse&);
+
// This method doesn't compare the all members.
static bool compare(const ResourceResponse&, const ResourceResponse&);
@@ -457,6 +468,9 @@ class PLATFORM_EXPORT ResourceResponse final {
// Remote port number of the socket which fetched this resource.
unsigned short m_remotePort;
+ // Size of the response in bytes prior to decompression.
+ long long m_encodedDataLength;
+
// Size of the response body in bytes prior to decompression.
long long m_encodedBodyLength;
@@ -473,6 +487,10 @@ class PLATFORM_EXPORT ResourceResponse final {
// ExtraData associated with the response.
RefPtr<ExtraData> m_extraData;
+
+ // PlzNavigate: the redirect responses are transmitted
+ // inside the final response.
+ Vector<ResourceResponse> m_redirectResponses;
};
inline bool operator==(const ResourceResponse& a, const ResourceResponse& b) {
@@ -521,6 +539,7 @@ struct CrossThreadResourceResponseData {
int64_t m_responseTime;
String m_remoteIPAddress;
unsigned short m_remotePort;
+ long long m_encodedDataLength;
long long m_encodedBodyLength;
long long m_decodedBodyLength;
String m_downloadedFilePath;

Powered by Google App Engine
This is Rietveld 408576698