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 c82c64a7577040b2cc60bec9595ad815bff122b6..aa78a114195be380fc07e14140c69304dd899c38 100644 |
--- a/third_party/WebKit/Source/core/frame/UseCounter.h |
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h |
@@ -67,7 +67,12 @@ class CORE_EXPORT UseCounter { |
enum Context { |
kDefaultContext, |
// Counters for SVGImages (lifetime independent from other pages). |
- kSVGImageContext |
+ kSVGImageContext, |
+ // Counters for extensions. |
+ kExtensionContext, |
+ // Context when counters should be disabled (eg, internal pages such as |
+ // about, chrome-devtools, etc). |
+ kDisabledContext |
}; |
UseCounter(Context = kDefaultContext); |
@@ -1587,8 +1592,8 @@ class CORE_EXPORT UseCounter { |
}; |
// An interface to observe UseCounter changes. Note that this is never |
- // notified when the counter is disabled by |m_muteCount| or |
- // |m_disableReporting|. |
+ // notified when the counter is disabled by |m_muteCount| or when |m_context| |
+ // is DisabledContext. |
class Observer : public GarbageCollected<Observer> { |
public: |
// Notified when a feature is counted for the first time. This should return |
@@ -1650,8 +1655,8 @@ class CORE_EXPORT UseCounter { |
private: |
// Notifies that a feature is newly counted to |m_observers|. This shouldn't |
- // be called when the counter is disabled by |m_muteCount| or |
- // |m_disableReporting|. |
+ // be called when the counter is disabled by |m_muteCount| or when |m_context| |
+ // if DisabledContext. |
void NotifyFeatureCounted(Feature); |
EnumerationHistogram& FeaturesHistogram() const; |
@@ -1661,9 +1666,6 @@ class CORE_EXPORT UseCounter { |
// If non-zero, ignore all 'count' calls completely. |
unsigned mute_count_; |
- // If true, disable reporting all histogram entries. |
- bool disable_reporting_; |
- |
// The scope represented by this UseCounter instance. |
Rick Byers
2017/04/28 15:04:40
Nit: can you add a comment saying that this must b
lunalu1
2017/05/01 15:37:52
Done. Thanks
|
Context context_; |