Chromium Code Reviews| Index: third_party/WebKit/Source/core/timing/PerformanceServerTiming.cpp |
| diff --git a/third_party/WebKit/Source/core/timing/PerformanceServerTiming.cpp b/third_party/WebKit/Source/core/timing/PerformanceServerTiming.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6f8c6317806a6a984034f036808caf4f5b98446d |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/timing/PerformanceServerTiming.cpp |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "core/timing/PerformanceServerTiming.h" |
| + |
| +#include "bindings/core/v8/V8ObjectBuilder.h" |
| +#include "core/timing/PerformanceBase.h" |
|
Charlie Harrison
2017/04/07 12:43:01
Can you #include WTFString.h?
|
| + |
| +namespace blink { |
| + |
| +PerformanceServerTiming::PerformanceServerTiming(const String& name, |
| + const String& metric, |
| + double duration, |
| + const String& description) |
| + : PerformanceEntry(name, "server", 0.0, duration), |
| + m_metric(metric), |
| + m_description(description) {} |
| + |
| +PerformanceServerTiming::~PerformanceServerTiming() {} |
| + |
| +String PerformanceServerTiming::metric() const { |
| + return m_metric; |
| +} |
| + |
| +String PerformanceServerTiming::description() const { |
| + return m_description; |
| +} |
| + |
| +void PerformanceServerTiming::buildJSONValue(V8ObjectBuilder& builder) const { |
| + PerformanceEntry::buildJSONValue(builder); |
| + builder.addString("metric", metric()); |
| + builder.addString("description", description()); |
| +} |
| + |
| +} // namespace blink |