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

Unified Diff: third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp

Issue 2359493004: FontLoadHistograms: classify as memory cache hit if FontResource loading not triggered (Closed)
Patch Set: #20 Created 4 years, 3 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/css/RemoteFontFaceSource.cpp
diff --git a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
index 638504edc43eb4d7de3a6f295989eb95929a4d1c..349bdd623187bc71cb4a24bd7740691ff44864ef 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -254,8 +254,7 @@ void RemoteFontFaceSource::FontLoadHistograms::fontLoaded(bool isInterventionTri
void RemoteFontFaceSource::FontLoadHistograms::longLimitExceeded(bool isInterventionTriggered)
{
m_isLongLimitExceeded = true;
- if (m_dataSource == FromUnknown)
- m_dataSource = FromNetwork;
+ maySetDataSource(FromNetwork);
recordInterventionResult(isInterventionTriggered);
}
@@ -275,6 +274,7 @@ void RemoteFontFaceSource::FontLoadHistograms::recordRemoteFont(const FontResour
cacheHitHistogram.count(dataSourceMetricsValue());
if (m_dataSource == FromDiskCache || m_dataSource == FromNetwork) {
+ DCHECK_NE(m_loadStartTime, 0);
int duration = static_cast<int>(currentTimeMS() - m_loadStartTime);
recordLoadTimeHistogram(font, duration);

Powered by Google App Engine
This is Rietveld 408576698