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

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

Issue 2290733002: Add new UseCounter metric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make diff prettier 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
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 f42a496e4a02eb2725ae0f773c04c99303ac0ebc..fb1d9619255ff73a50db350583567bd0ddd783c2 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.h
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -59,12 +59,11 @@ class CORE_EXPORT UseCounter {
WTF_MAKE_NONCOPYABLE(UseCounter);
public:
UseCounter();
- ~UseCounter();
enum Feature {
// Do not change assigned numbers of existing items: add new features
// to the end of the list.
- PageDestruction = 0,
+ OBSOLETE_PageDestruction = 0,
PrefixedIndexedDB = 3,
WorkerStart = 4,
SharedWorkerStart = 5,
@@ -1338,11 +1337,26 @@ public:
bool hasRecordedMeasurement(Feature) const;
protected:
- friend class UseCounterTest;
+ // Encapsulates the work to preserve the old "FeatureObserver" histogram with original semantics
+ // TODO(rbyers): remove this - http://crbug.com/597963
+ class LegacyCounter {
Nico 2016/09/13 14:16:47 this needs a CORE_EXPORT, else release component b
+ public:
+ LegacyCounter();
+ ~LegacyCounter();
+ void countFeature(Feature);
+ void countCSS(CSSPropertyID);
+ void updateMeasurements();
+ private:
+ // Tracks what features/properties need to be reported to the legacy histograms.
+ BitVector m_featureBits;
+ BitVector m_CSSBits;
+ } m_legacyCounter;
+
unsigned m_muteCount;
- BitVector m_featureBits;
- BitVector m_CSSFeatureBits;
+ // 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 | « third_party/WebKit/Source/core/frame/PRESUBMIT.py ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698