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

Unified Diff: third_party/WebKit/Source/core/fetch/FetchRequest.cpp

Issue 1987013002: Add UMA to track time between preload discovery and reference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@preload_timing_uma
Patch Set: update histograms.xml to be a bit clearer Created 4 years, 7 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/core/fetch/FetchRequest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/FetchRequest.cpp b/third_party/WebKit/Source/core/fetch/FetchRequest.cpp
index 7fe6ab527e118d8693f95b878173e8e8bbe4f019..b26a62d25e27d74de620cd25157d51601c3a9f2a 100644
--- a/third_party/WebKit/Source/core/fetch/FetchRequest.cpp
+++ b/third_party/WebKit/Source/core/fetch/FetchRequest.cpp
@@ -37,6 +37,7 @@ FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
, m_priority(priority)
, m_forPreload(false)
, m_linkPreload(false)
+ , m_preloadDiscoveryTime(0.0)
, m_defer(NoDefer)
, m_originRestriction(UseDefaultOriginRestrictionForType)
{
@@ -49,6 +50,7 @@ FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
, m_priority(ResourceLoadPriorityUnresolved)
, m_forPreload(false)
, m_linkPreload(false)
+ , m_preloadDiscoveryTime(0.0)
, m_defer(NoDefer)
, m_originRestriction(UseDefaultOriginRestrictionForType)
{
@@ -61,6 +63,7 @@ FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const FetchIn
, m_priority(ResourceLoadPriorityUnresolved)
, m_forPreload(false)
, m_linkPreload(false)
+ , m_preloadDiscoveryTime(0.0)
, m_defer(NoDefer)
, m_originRestriction(UseDefaultOriginRestrictionForType)
{
@@ -98,4 +101,10 @@ void FetchRequest::setResourceWidth(ResourceWidth resourceWidth)
}
}
+void FetchRequest::setForPreload(bool forPreload, double discoveryTime)
+{
+ m_forPreload = forPreload;
+ m_preloadDiscoveryTime = discoveryTime;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchRequest.h ('k') | third_party/WebKit/Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698