| 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 590b0749a3e06852839a347d12c4a6dd304aa64f..b86d633cb5227e4bed4c09d73a1172da1b69bab6 100644
|
| --- a/third_party/WebKit/Source/core/frame/UseCounter.h
|
| +++ b/third_party/WebKit/Source/core/frame/UseCounter.h
|
| @@ -29,6 +29,7 @@
|
| #include "core/CSSPropertyNames.h"
|
| #include "core/CoreExport.h"
|
| #include "core/css/parser/CSSParserMode.h"
|
| +#include "platform/weborigin/KURL.h"
|
| #include "wtf/BitVector.h"
|
| #include "wtf/Noncopyable.h"
|
| #include "wtf/text/WTFString.h"
|
| @@ -1428,7 +1429,8 @@ class CORE_EXPORT UseCounter {
|
| static bool isCounted(Document&, const String&);
|
| bool isCounted(CSSPropertyID unresolvedProperty);
|
|
|
| - void didCommitLoad();
|
| + // Invoked when a new document is loaded into the main frame of the page.
|
| + void didCommitLoad(KURL);
|
|
|
| static UseCounter* getFrom(const Document*);
|
| static UseCounter* getFrom(const CSSStyleSheet*);
|
| @@ -1436,19 +1438,28 @@ class CORE_EXPORT UseCounter {
|
|
|
| static int mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyID);
|
|
|
| + // When muted, all calls to "count" functions are ignoed. May be nested.
|
| void muteForInspector();
|
| void unmuteForInspector();
|
|
|
| void recordMeasurement(Feature);
|
| - void updateMeasurements();
|
|
|
| + // Return whether the feature has been seen since the last page load
|
| + // (except when muted). Does include features seen in documents which have
|
| + // reporting disabled.
|
| bool hasRecordedMeasurement(Feature) const;
|
|
|
| private:
|
| EnumerationHistogram& featuresHistogram() const;
|
| EnumerationHistogram& cssHistogram() const;
|
|
|
| + // If non-zero, ignore all 'count' calls completely.
|
| unsigned m_muteCount;
|
| +
|
| + // If true, disable reporting all histogram entries.
|
| + bool m_disableReporting;
|
| +
|
| + // The scope represented by this UseCounter instance.
|
| Context m_context;
|
|
|
| // Track what features/properties have been reported to the (non-legacy)
|
| @@ -1458,7 +1469,7 @@ class CORE_EXPORT UseCounter {
|
|
|
| // Encapsulates the work to preserve the old "FeatureObserver" histogram with
|
| // original semantics
|
| - // TODO(rbyers): remove this - http://crbug.com/597963
|
| + // TODO(rbyers): remove this - http://crbug.com/676837
|
| class CORE_EXPORT LegacyCounter {
|
| public:
|
| LegacyCounter();
|
|
|