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

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

Issue 2342273003: Refine FontLoadHistograms::recordRemoteFont() logic (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | 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 b90978fb69e96151c5bbbafa07d3eae875576297..540430901f82395b540e30e7174d03f4e137efb0 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -265,10 +265,10 @@ void RemoteFontFaceSource::FontLoadHistograms::recordFallbackTime(const FontReso
void RemoteFontFaceSource::FontLoadHistograms::recordRemoteFont(const FontResource* font)
{
- if (m_loadStartTime > 0 && font && !font->isLoading()) {
- DEFINE_STATIC_LOCAL(EnumerationHistogram, cacheHitHistogram, ("WebFont.CacheHit", CacheHitEnumMax));
- cacheHitHistogram.count(dataSourceMetricsValue());
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, cacheHitHistogram, ("WebFont.CacheHit", CacheHitEnumMax));
+ cacheHitHistogram.count(dataSourceMetricsValue());
+ if (m_dataSource == FromDiskCache || m_dataSource == FromNetwork) {
int duration = static_cast<int>(currentTimeMS() - m_loadStartTime);
recordLoadTimeHistogram(font, duration);
m_loadStartTime = -1;
Kunihiko Sakamoto 2016/09/16 09:03:15 We can remove this line, as this function is calle
Shao-Chuan Lee 2016/09/16 09:23:16 Done.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698