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

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: decouple enable / disable observer from ctor / dtor, to prevent the issue of tasks getting reported… 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..c88ffd7fcaaff53cd40a61c1e8054c7e4784565a 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() {}
+ virtual void disableLongTaskInstrumentation() {}
+
// 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