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

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

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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/RemoteFontFaceSource.h
diff --git a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h
index 9bd6946fa80a57ec6af840e1424520f7fbcdeba2..36e203efd2b241c930717cb54ee01ea0ceb20456 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h
@@ -74,7 +74,10 @@ private:
void recordRemoteFont(const FontResource*);
bool hadBlankText() { return m_blankPaintTime; }
DataSource dataSource() { return m_dataSource; }
- void maySetDataSource(DataSource dataSource) { m_dataSource = (m_dataSource != FromUnknown) ? m_dataSource : dataSource; }
+ // Classify as memory cache hit if |m_loadStartTime| is not set, i.e.
+ // this RemoteFontFaceSource instance didn't trigger FontResource
+ // loading.
+ void maySetDataSource(DataSource dataSource) { m_dataSource = (m_dataSource != FromUnknown) ? m_dataSource : (m_loadStartTime == 0) ? FromMemoryCache : dataSource; }
kouhei (in TOK) 2016/09/30 01:18:35 Please implement this in .cpp file, not nesting ?:
private:
void recordLoadTimeHistogram(const FontResource*, int duration);
void recordInterventionResult(bool isTriggered);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698