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 f6209bfbf07310e33332a7888b0df623891f4463..9cb7078b7acde97dc4d1a6f437b136605c00073a 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); |
@@ -1594,8 +1599,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 kDisabledContext. |
class Observer : public GarbageCollected<Observer> { |
public: |
// Notified when a feature is counted for the first time. This should return |
@@ -1657,8 +1662,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 kDisabledContext. |
void NotifyFeatureCounted(Feature); |
EnumerationHistogram& FeaturesHistogram() const; |
@@ -1668,10 +1673,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) |