diff options
Diffstat (limited to 'Source/WebCore/page/PerformanceMark.h')
-rw-r--r-- | Source/WebCore/page/PerformanceMark.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/WebCore/page/PerformanceMark.h b/Source/WebCore/page/PerformanceMark.h index 64b39abfd..528ba1996 100644 --- a/Source/WebCore/page/PerformanceMark.h +++ b/Source/WebCore/page/PerformanceMark.h @@ -23,30 +23,34 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PerformanceMark_h -#define PerformanceMark_h +#pragma once -#if ENABLE(USER_TIMING) +#if ENABLE(WEB_TIMING) #include "PerformanceEntry.h" -#include <wtf/PassRefPtr.h> #include <wtf/text/WTFString.h> namespace WebCore { -class PerformanceMark : public PerformanceEntry { +class PerformanceMark final : public PerformanceEntry { public: - static PassRefPtr<PerformanceMark> create(const String& name, double startTime) { return adoptRef(new PerformanceMark(name, startTime)); } + static Ref<PerformanceMark> create(const String& name, double startTime) { return adoptRef(*new PerformanceMark(name, startTime)); } - virtual bool isMark() { return true; } + bool isMark() const override { return true; } private: - PerformanceMark(const String& name, double startTime) : PerformanceEntry(name, "mark", startTime, startTime) { } + PerformanceMark(const String& name, double startTime) + : PerformanceEntry(PerformanceEntry::Type::Mark, name, ASCIILiteral("mark"), startTime, startTime) + { + } + ~PerformanceMark() { } }; -} +} // namespace WebCore -#endif // ENABLE(USER_TIMING) +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceMark) + static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isMark(); } +SPECIALIZE_TYPE_TRAITS_END() -#endif // !defined(PerformanceMark_h) +#endif // ENABLE(WEB_TIMING) |