From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/page/PerformanceUserTiming.h | 44 +++++++++++------------------ 1 file changed, 17 insertions(+), 27 deletions(-) (limited to 'Source/WebCore/page/PerformanceUserTiming.h') diff --git a/Source/WebCore/page/PerformanceUserTiming.h b/Source/WebCore/page/PerformanceUserTiming.h index 14c8c3f9b..783137378 100644 --- a/Source/WebCore/page/PerformanceUserTiming.h +++ b/Source/WebCore/page/PerformanceUserTiming.h @@ -23,56 +23,46 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PerformanceUserTiming_h -#define PerformanceUserTiming_h +#pragma once -#if ENABLE(USER_TIMING) +#if ENABLE(WEB_TIMING) -#include "EventException.h" -#include "ExceptionCode.h" -#include "Performance.h" -#include "PerformanceTiming.h" +#include "ExceptionOr.h" +#include "PerformanceMark.h" +#include "PerformanceMeasure.h" #include -#include -#include #include -#include namespace WebCore { class Performance; -class PerformanceEntry; -typedef unsigned long long (PerformanceTiming::*NavigationTimingFunction)() const; -typedef HashMap > > PerformanceEntryMap; +using PerformanceEntryMap = HashMap>>; -class UserTiming : public RefCounted { +class UserTiming { public: - static PassRefPtr create(Performance* performance) { return adoptRef(new UserTiming(performance)); } + explicit UserTiming(Performance&); - void mark(const String& markName, ExceptionCode&); + ExceptionOr> mark(const String& markName); void clearMarks(const String& markName); - void measure(const String& measureName, const String& startMark, const String& endMark, ExceptionCode&); + ExceptionOr> measure(const String& measureName, const String& startMark, const String& endMark); void clearMeasures(const String& measureName); - Vector > getMarks() const; - Vector > getMeasures() const; + Vector> getMarks() const; + Vector> getMeasures() const; - Vector > getMarks(const String& name) const; - Vector > getMeasures(const String& name) const; + Vector> getMarks(const String& name) const; + Vector> getMeasures(const String& name) const; private: - explicit UserTiming(Performance*); + ExceptionOr findExistingMarkStartTime(const String& markName); - double findExistingMarkStartTime(const String& markName, ExceptionCode&); - Performance* m_performance; + Performance& m_performance; PerformanceEntryMap m_marksMap; PerformanceEntryMap m_measuresMap; }; } -#endif // ENABLE(USER_TIMING) - -#endif // !defined(PerformanceUserTiming_h) +#endif // ENABLE(WEB_TIMING) -- cgit v1.2.1