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

Side by Side Diff: third_party/WebKit/Source/core/css/RemoteFontFaceSource.h

Issue 1659053002: Remove custom counts histogram from the blink API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a few thread_safe_static_local -> static_local as per feedback in reviews Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef RemoteFontFaceSource_h 5 #ifndef RemoteFontFaceSource_h
6 #define RemoteFontFaceSource_h 6 #define RemoteFontFaceSource_h
7 7
8 #include "core/css/CSSFontFaceSource.h" 8 #include "core/css/CSSFontFaceSource.h"
9 #include "core/fetch/FontResource.h" 9 #include "core/fetch/FontResource.h"
10 #include "core/fetch/ResourcePtr.h" 10 #include "core/fetch/ResourcePtr.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 public: 63 public:
64 FontLoadHistograms() : m_loadStartTime(0), m_fallbackPaintTime(0), m_isL ongLimitExceeded(false) { } 64 FontLoadHistograms() : m_loadStartTime(0), m_fallbackPaintTime(0), m_isL ongLimitExceeded(false) { }
65 void loadStarted(); 65 void loadStarted();
66 void fallbackFontPainted(); 66 void fallbackFontPainted();
67 void fontLoaded(bool isInterventionTriggered); 67 void fontLoaded(bool isInterventionTriggered);
68 void longLimitExceeded(bool isInterventionTriggered); 68 void longLimitExceeded(bool isInterventionTriggered);
69 void recordFallbackTime(const FontResource*); 69 void recordFallbackTime(const FontResource*);
70 void recordRemoteFont(const FontResource*); 70 void recordRemoteFont(const FontResource*);
71 bool hadBlankText() { return m_fallbackPaintTime; } 71 bool hadBlankText() { return m_fallbackPaintTime; }
72 private: 72 private:
73 const char* histogramName(const FontResource*); 73 void recordLoadTimeHistogram(const FontResource*, int duration);
74 void recordInterventionResult(bool triggered); 74 void recordInterventionResult(bool triggered);
75 double m_loadStartTime; 75 double m_loadStartTime;
76 double m_fallbackPaintTime; 76 double m_fallbackPaintTime;
77 bool m_isLongLimitExceeded; 77 bool m_isLongLimitExceeded;
78 }; 78 };
79 79
80 void switchToSwapPeriod(); 80 void switchToSwapPeriod();
81 void switchToFailurePeriod(); 81 void switchToFailurePeriod();
82 82
83 ResourcePtr<FontResource> m_font; 83 ResourcePtr<FontResource> m_font;
84 RefPtrWillBeMember<FontLoader> m_fontLoader; 84 RefPtrWillBeMember<FontLoader> m_fontLoader;
85 const FontDisplay m_display; 85 const FontDisplay m_display;
86 DisplayPeriod m_period; 86 DisplayPeriod m_period;
87 FontLoadHistograms m_histograms; 87 FontLoadHistograms m_histograms;
88 bool m_isInterventionTriggered; 88 bool m_isInterventionTriggered;
89 }; 89 };
90 90
91 } // namespace blink 91 } // namespace blink
92 92
93 #endif 93 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFaceSet.cpp ('k') | third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698