Chromium Code Reviews| 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 f98a6e7e75b61ef311b3b061a2643ad1d057aaf6..577cd25ad222f6373f00109fb6da04d06aea75fc 100644 |
| --- a/third_party/WebKit/Source/platform/network/ResourceResponse.h |
| +++ b/third_party/WebKit/Source/platform/network/ResourceResponse.h |
| @@ -278,11 +278,14 @@ public: |
| 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&); |
| @@ -297,6 +300,12 @@ public: |
| 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 std::vector<ResourceResponse>& redirectResponses() const { return m_redirectResponses; } |
|
Nate Chapin
2016/09/08 18:41:13
WTF::Vector instead of std::vector in blink. Legac
arthursonzogni
2016/09/09 12:45:33
Done.
|
| + void appendRedirectResponse(const ResourceResponse&); |
| + |
| // This method doesn't compare the all members. |
| static bool compare(const ResourceResponse&, const ResourceResponse&); |
| @@ -412,6 +421,9 @@ private: |
| // 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; |
| @@ -428,6 +440,10 @@ private: |
| // ExtraData associated with the response. |
| RefPtr<ExtraData> m_extraData; |
| + |
| + // PlzNavigate: the redirect responses are transmitted |
| + // inside the final response. |
| + std::vector<ResourceResponse> m_redirectResponses; |
| }; |
| inline bool operator==(const ResourceResponse& a, const ResourceResponse& b) { return ResourceResponse::compare(a, b); } |
| @@ -468,6 +484,7 @@ public: |
| 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; |