Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1288)

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceServerTiming.cpp

Issue 2839683003: Server-Timing (Closed)
Patch Set: make those robots happy, attempt #4 Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..4dc50b210610b1c55c578490d0c86228106d3253
--- /dev/null
+++ b/third_party/WebKit/Source/core/timing/PerformanceServerTiming.cpp
@@ -0,0 +1,37 @@
+// 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"
+#include "platform/wtf/text/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

Powered by Google App Engine
This is Rietveld 408576698