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

Unified Diff: Source/core/fetch/FontResource.h

Issue 23720005: Move webfont usage metrics reporting to FontResource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | « Source/core/css/CSSFontFaceSource.cpp ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/FontResource.h
diff --git a/Source/core/fetch/FontResource.h b/Source/core/fetch/FontResource.h
index 42b4f7029d5e251de71241c5653d91dc3a384439..a910f8efaa91ce095a77d020e1139ea7cb2035f0 100644
--- a/Source/core/fetch/FontResource.h
+++ b/Source/core/fetch/FontResource.h
@@ -50,6 +50,7 @@ public:
virtual void didAddClient(ResourceClient*);
virtual void allClientsRemoved();
+ void willUseFontData();
void beginLoadIfNeeded(ResourceFetcher* dl);
bool stillNeedsLoad() const { return !m_loadInitiated; }
@@ -69,6 +70,22 @@ private:
#if ENABLE(SVG_FONTS)
RefPtr<WebCore::SVGDocument> m_externalSVGDocument;
#endif
+ class FontResourceHistograms {
+ public:
+ enum UsageType {
+ StyledAndUsed,
+ StyledButNotUsed,
+ NotStyledButUsed,
+ UsageTypeMax
+ };
+ FontResourceHistograms() : m_styledTime(0) { }
+ ~FontResourceHistograms();
+ void willUseFontData();
+ void loadStarted();
+ private:
+ double m_styledTime;
+ };
+ FontResourceHistograms m_histograms;
friend class MemoryCache;
};
« no previous file with comments | « Source/core/css/CSSFontFaceSource.cpp ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698