summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/PerformanceMark.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/page/PerformanceMark.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/page/PerformanceMark.h')
-rw-r--r--Source/WebCore/page/PerformanceMark.h26
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)