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

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

Issue 2284503002: Minor UseCounter clean-ups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 66318866ae192a0eeebee04c38a54d2b2bc9adcf..9a2e17e154aa58679e734fb11b97ebb20bfd3112 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.h
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -1330,7 +1330,7 @@ public:
static UseCounter* getFrom(const CSSStyleSheet*);
static UseCounter* getFrom(const StyleSheetContents*);
- static int mapCSSPropertyIdToCSSSampleIdForHistogram(int id);
+ static int mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyID);
void muteForInspector();
void unmuteForInspector();
@@ -1338,40 +1338,13 @@ public:
void recordMeasurement(Feature);
void updateMeasurements();
- bool hasRecordedMeasurement(Feature feature) const { return m_countBits.hasRecordedMeasurement(feature); }
-
- class CountBits {
- DISALLOW_NEW();
- public:
- CountBits() : m_bits(NumberOfFeatures) { }
-
- bool hasRecordedMeasurement(Feature feature) const
- {
- ASSERT(feature != PageDestruction); // PageDestruction is reserved as a scaling factor.
- ASSERT(feature < NumberOfFeatures);
-
- return m_bits.quickGet(feature);
- }
-
- void recordMeasurement(Feature feature)
- {
- ASSERT(feature != PageDestruction); // PageDestruction is reserved as a scaling factor.
- ASSERT(feature < NumberOfFeatures);
-
- m_bits.quickSet(feature);
- }
-
- void updateMeasurements();
-
- private:
- BitVector m_bits;
- };
+ bool hasRecordedMeasurement(Feature) const;
protected:
friend class UseCounterTest;
unsigned m_muteCount;
- CountBits m_countBits;
+ BitVector m_featureBits;
BitVector m_CSSFeatureBits;
};

Powered by Google App Engine
This is Rietveld 408576698