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

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

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: Fix lint error: ASSERT -> DCHECK 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/ResourceTimingInfo.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h b/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h
index f7ff7c1655655ea5c158af4d28cb01561c31bc99..452d50727b5c97c865c9d3594cf6e8872ceb8e13 100644
--- a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h
+++ b/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h
@@ -76,9 +76,12 @@ public:
void setFinalResponse(const ResourceResponse& response) { m_finalResponse = response; }
const ResourceResponse& finalResponse() const { return m_finalResponse; }
- void addRedirect(const ResourceResponse& redirectResponse) { m_redirectChain.append(redirectResponse); }
+ void addRedirect(const ResourceResponse& redirectResponse, long long encodedDataLength, bool crossOrigin);
const Vector<ResourceResponse>& redirectChain() const { return m_redirectChain; }
+ void addFinalTransferSize(long long encodedDataLength) { m_transferSize += encodedDataLength; }
+ long long transferSize() const { return m_transferSize; }
+
void clearLoadTimings()
{
m_finalResponse.setResourceLoadTiming(nullptr);
@@ -90,7 +93,9 @@ private:
ResourceTimingInfo(const AtomicString& type, const double time, bool isMainResource)
: m_type(type)
, m_initialTime(time)
+ , m_transferSize(0)
, m_isMainResource(isMainResource)
+ , m_hasCrossOriginRedirect(false)
{
}
@@ -101,7 +106,9 @@ private:
ResourceRequest m_initialRequest;
ResourceResponse m_finalResponse;
Vector<ResourceResponse> m_redirectChain;
+ long long m_transferSize;
bool m_isMainResource;
+ bool m_hasCrossOriginRedirect;
};
struct CrossThreadResourceTimingInfoData {
@@ -117,6 +124,7 @@ public:
std::unique_ptr<CrossThreadResourceRequestData> m_initialRequest;
std::unique_ptr<CrossThreadResourceResponseData> m_finalResponse;
Vector<std::unique_ptr<CrossThreadResourceResponseData>> m_redirectChain;
+ long long m_transferSize;
bool m_isMainResource;
};

Powered by Google App Engine
This is Rietveld 408576698