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

Unified Diff: Source/core/timing/ResourceTimingInfo.h

Issue 42363004: [Resource Timing] Memory cached resources should be reported on first use. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix unsigned Created 7 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
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/timing/ResourceTimingInfo.h
diff --git a/Source/core/timing/ResourceTimingInfo.h b/Source/core/timing/ResourceTimingInfo.h
index ba8544cb6351acb0b448f84842ca6b77c3f9ee7e..a3784a63e59da6f6bff6bbdd34a104255507a86b 100644
--- a/Source/core/timing/ResourceTimingInfo.h
+++ b/Source/core/timing/ResourceTimingInfo.h
@@ -61,6 +61,13 @@ public:
void addRedirect(const ResourceResponse& redirectResponse) { m_redirectChain.append(redirectResponse); }
const Vector<ResourceResponse>& redirectChain() const { return m_redirectChain; }
+ void clearLoadTimings()
+ {
+ m_finalResponse.setResourceLoadTiming(0);
+ for (size_t i = 0; i < m_redirectChain.size(); ++i)
+ m_redirectChain[i].setResourceLoadTiming(0);
+ }
+
private:
ResourceTimingInfo(const AtomicString& type, const double time)
: m_type(type)
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698