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

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

Issue 1766993002: BlankText UMAs should be reported only for webfonts in block period (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/Source/core/css/RemoteFontFaceSource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 70f8c19f45897f17eaae0581cb79f818875ac1ce..10b7d91dd921f3a79998fe66f338b18db72dd4c6 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -199,10 +199,10 @@ void RemoteFontFaceSource::FontLoadHistograms::loadStarted()
m_loadStartTime = currentTimeMS();
}
-void RemoteFontFaceSource::FontLoadHistograms::fallbackFontPainted()
+void RemoteFontFaceSource::FontLoadHistograms::fallbackFontPainted(DisplayPeriod period)
{
- if (!m_fallbackPaintTime)
- m_fallbackPaintTime = currentTimeMS();
+ if (period == BlockPeriod && !m_blankPaintTime)
+ m_blankPaintTime = currentTimeMS();
}
void RemoteFontFaceSource::FontLoadHistograms::fontLoaded(bool isInterventionTriggered)
@@ -219,12 +219,12 @@ void RemoteFontFaceSource::FontLoadHistograms::longLimitExceeded(bool isInterven
void RemoteFontFaceSource::FontLoadHistograms::recordFallbackTime(const FontResource* font)
{
- if (m_fallbackPaintTime <= 0)
+ if (m_blankPaintTime <= 0)
return;
- int duration = static_cast<int>(currentTimeMS() - m_fallbackPaintTime);
+ int duration = static_cast<int>(currentTimeMS() - m_blankPaintTime);
DEFINE_STATIC_LOCAL(CustomCountHistogram, blankTextShownTimeHistogram, ("WebFont.BlankTextShownTime", 0, 10000, 50));
blankTextShownTimeHistogram.count(duration);
- m_fallbackPaintTime = -1;
+ m_blankPaintTime = -1;
}
void RemoteFontFaceSource::FontLoadHistograms::recordRemoteFont(const FontResource* font)
« no previous file with comments | « third_party/WebKit/Source/core/css/RemoteFontFaceSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698