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

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

Issue 2375353003: FontLoadHistograms: move maySetDataSource() impl out of header (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 | « 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 349bdd623187bc71cb4a24bd7740691ff44864ef..fd4d03fc9304ec05561117053f2a44b10eefd6ce 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -285,6 +285,19 @@ void RemoteFontFaceSource::FontLoadHistograms::recordRemoteFont(const FontResour
}
}
+void RemoteFontFaceSource::FontLoadHistograms::maySetDataSource(DataSource dataSource)
+{
+ if (m_dataSource != FromUnknown)
+ return;
+ // Classify as memory cache hit if |m_loadStartTime| is not set, i.e.
+ // this RemoteFontFaceSource instance didn't trigger FontResource
+ // loading.
+ if (m_loadStartTime == 0)
+ m_dataSource = FromMemoryCache;
+ else
+ m_dataSource = dataSource;
+}
+
void RemoteFontFaceSource::FontLoadHistograms::recordLoadTimeHistogram(const FontResource* font, int duration)
{
CHECK_NE(FromUnknown, m_dataSource);
« 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