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 6accb1b54777c9f38d5d3fce81a92b3c7c8d5087..b85fea60a23cdb406e5bb73612cd8028889c07d8 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); |
@@ -1586,8 +1591,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 |
@@ -1649,8 +1654,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; |
@@ -1660,10 +1665,8 @@ 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. |
+ // The scope represented by this UseCounter instance, which must be fixed for |
+ // the duration of a page but can change when a new page is loaded. |
Context context_; |
// Track what features/properties have been reported to the (non-legacy) |