summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/PerformanceMeasure.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/PerformanceMeasure.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/page/PerformanceMeasure.h')
-rw-r--r--Source/WebCore/page/PerformanceMeasure.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/WebCore/page/PerformanceMeasure.h b/Source/WebCore/page/PerformanceMeasure.h
index 65564959b..cdb0b6c58 100644
--- a/Source/WebCore/page/PerformanceMeasure.h
+++ b/Source/WebCore/page/PerformanceMeasure.h
@@ -23,30 +23,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PerformanceMeasure_h
-#define PerformanceMeasure_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 PerformanceMeasure : public PerformanceEntry {
+class PerformanceMeasure final : public PerformanceEntry {
public:
- static PassRefPtr<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(new PerformanceMeasure(name, startTime, duration)); }
+ static Ref<PerformanceMeasure> create(const String& name, double startTime, double duration) { return adoptRef(*new PerformanceMeasure(name, startTime, duration)); }
- virtual bool isMeasure() { return true; }
+ bool isMeasure() const override { return true; }
private:
- PerformanceMeasure(const String& name, double startTime, double duration) : PerformanceEntry(name, "measure", startTime, duration) { }
+ PerformanceMeasure(const String& name, double startTime, double duration)
+ : PerformanceEntry(PerformanceEntry::Type::Measure, name, ASCIILiteral("measure"), startTime, duration)
+ {
+ }
+
~PerformanceMeasure() { }
};
-}
+} // namespace WebCore
-#endif // ENABLE(USER_TIMING)
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::PerformanceMeasure)
+ static bool isType(const WebCore::PerformanceEntry& entry) { return entry.isMeasure(); }
+SPECIALIZE_TYPE_TRAITS_END()
-#endif // !defined(PerformanceMeasure_h)
+#endif // ENABLE(WEB_TIMING)