Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/timing/PerformanceServerTiming.h" | |
| 6 | |
| 7 #include "bindings/core/v8/V8ObjectBuilder.h" | |
| 8 #include "core/timing/PerformanceBase.h" | |
|
Charlie Harrison
2017/04/07 12:43:01
Can you #include WTFString.h?
| |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 PerformanceServerTiming::PerformanceServerTiming(const String& name, | |
| 13 const String& metric, | |
| 14 double duration, | |
| 15 const String& description) | |
| 16 : PerformanceEntry(name, "server", 0.0, duration), | |
| 17 m_metric(metric), | |
| 18 m_description(description) {} | |
| 19 | |
| 20 PerformanceServerTiming::~PerformanceServerTiming() {} | |
| 21 | |
| 22 String PerformanceServerTiming::metric() const { | |
| 23 return m_metric; | |
| 24 } | |
| 25 | |
| 26 String PerformanceServerTiming::description() const { | |
| 27 return m_description; | |
| 28 } | |
| 29 | |
| 30 void PerformanceServerTiming::buildJSONValue(V8ObjectBuilder& builder) const { | |
| 31 PerformanceEntry::buildJSONValue(builder); | |
| 32 builder.addString("metric", metric()); | |
| 33 builder.addString("description", description()); | |
| 34 } | |
| 35 | |
| 36 } // namespace blink | |
| OLD | NEW |