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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBase.h

Issue 2343553005: enable / disable Long Task instrumentation based on presence of LongTask observer (Closed)
Patch Set: Created 4 years, 3 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/timing/PerformanceBase.h
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.h b/third_party/WebKit/Source/core/timing/PerformanceBase.h
index 463faf12043d5c14d5a53361cd21ad5c543977d0..8efd743f0c1625aa17cba51ede5f23a630fdea02 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.h
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.h
@@ -63,6 +63,9 @@ public:
virtual PerformanceTiming* timing() const;
+ virtual void enableLongTaskInstrumentation() const {}
+ virtual void disableLongTaskInstrumentation() const {}
caseq 2016/09/15 23:29:40 Why are these two const? I find it to be a bit art
panicker 2016/09/16 17:07:58 Done.
+
// Reduce the resolution to 5µs to prevent timing attacks. See:
// http://www.w3.org/TR/hr-time-2/#privacy-security
static double clampTimeResolution(double timeSeconds);
@@ -132,7 +135,7 @@ protected:
void addLongTaskTimingBuffer(PerformanceEntry&);
void notifyObserversOfEntry(PerformanceEntry&);
- bool hasObserverFor(PerformanceEntry::EntryType);
+ bool hasObserverFor(PerformanceEntry::EntryType) const;
void deliverObservationsTimerFired(TimerBase*);

Powered by Google App Engine
This is Rietveld 408576698