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

Unified Diff: third_party/WebKit/Source/core/frame/UseCounter.h

Issue 2329613002: Split SVGImage-related cases into separate UseCounter histograms (Closed)
Patch Set: Fix wording 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/frame/UseCounter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/UseCounter.h
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h
index ab40a614436df9054399b600091b39e2e50767c5..2188eef3caf7cbdec96da6f6482bfbb5a078bec8 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.h
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -38,6 +38,7 @@ namespace blink {
class CSSStyleSheet;
class Document;
+class EnumerationHistogram;
class ExecutionContext;
class Frame;
class LocalFrame;
@@ -58,7 +59,13 @@ class CORE_EXPORT UseCounter {
DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(UseCounter);
public:
- UseCounter();
+ enum Context {
+ DefaultContext,
+ // Counters for SVGImages (lifetime independent from other pages).
+ SVGImageContext
+ };
+
+ UseCounter(Context = DefaultContext);
enum Feature {
// Do not change assigned numbers of existing items: add new features
@@ -1338,7 +1345,17 @@ public:
bool hasRecordedMeasurement(Feature) const;
-protected:
+private:
+ EnumerationHistogram& featuresHistogram() const;
+ EnumerationHistogram& cssHistogram() const;
+
+ unsigned m_muteCount;
+ Context m_context;
+
+ // Track what features/properties have been reported to the (non-legacy) histograms.
+ BitVector m_featuresRecorded;
+ BitVector m_CSSRecorded;
+
// Encapsulates the work to preserve the old "FeatureObserver" histogram with original semantics
// TODO(rbyers): remove this - http://crbug.com/597963
class LegacyCounter {
@@ -1353,12 +1370,6 @@ protected:
BitVector m_featureBits;
BitVector m_CSSBits;
} m_legacyCounter;
-
- unsigned m_muteCount;
-
- // Track what features/properties have been reported to the (non-legacy) histograms.
- BitVector m_featuresRecorded;
- BitVector m_CSSRecorded;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698