summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/public/platform/web_resource_timing_info.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-15 10:20:33 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-15 10:28:57 +0000
commitd17ea114e5ef69ad5d5d7413280a13e6428098aa (patch)
tree2c01a75df69f30d27b1432467cfe7c1467a498da /chromium/third_party/blink/public/platform/web_resource_timing_info.h
parent8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (diff)
downloadqtwebengine-chromium-d17ea114e5ef69ad5d5d7413280a13e6428098aa.tar.gz
BASELINE: Update Chromium to 67.0.3396.47
Change-Id: Idcb1341782e417561a2473eeecc82642dafda5b7 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/third_party/blink/public/platform/web_resource_timing_info.h')
-rw-r--r--chromium/third_party/blink/public/platform/web_resource_timing_info.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/chromium/third_party/blink/public/platform/web_resource_timing_info.h b/chromium/third_party/blink/public/platform/web_resource_timing_info.h
new file mode 100644
index 00000000000..d0cccaae754
--- /dev/null
+++ b/chromium/third_party/blink/public/platform/web_resource_timing_info.h
@@ -0,0 +1,79 @@
+// 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.
+
+#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_RESOURCE_TIMING_INFO_H_
+#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_RESOURCE_TIMING_INFO_H_
+
+#include <stdint.h>
+
+#include "third_party/blink/public/platform/web_common.h"
+#include "third_party/blink/public/platform/web_string.h"
+#include "third_party/blink/public/platform/web_url_load_timing.h"
+#include "third_party/blink/public/platform/web_vector.h"
+
+namespace blink {
+
+// The browser-side equivalent to this struct is content::ServerTimingInfo.
+// TODO(dcheng): Migrate this struct over to Mojo so it doesn't need to be
+// duplicated in //content and //third_party/WebKit.
+struct WebServerTimingInfo {
+ WebServerTimingInfo(const WebString& name,
+ double duration,
+ const WebString& description)
+ : name(name), duration(duration), description(description) {}
+
+ WebString name;
+ double duration;
+ WebString description;
+};
+
+// This struct holds the information from PerformanceResourceTiming that needs
+// to be passed between processes. This is currently used to send timing
+// information about cross-process iframes for window.performance. The
+// browser-side equivalent to this struct is content::ResourceTimingInfo.
+// TODO(dcheng): Migrate this struct over to Mojo so it doesn't need to be
+// duplicated in //content and //third_party/WebKit.
+struct WebResourceTimingInfo {
+ // The name to associate with the performance entry. For iframes, this is
+ // typically the initial URL of the iframe resource.
+ WebString name;
+ double start_time;
+
+ WebString alpn_negotiated_protocol;
+ WebString connection_info;
+
+ WebURLLoadTiming timing;
+ double last_redirect_end_time;
+ double finish_time;
+
+ uint64_t transfer_size;
+ uint64_t encoded_body_size;
+ uint64_t decoded_body_size;
+
+ bool did_reuse_connection;
+
+ // TODO(dcheng): The way this code works is fairly confusing: it might seem
+ // unusual to store policy members like |allow_timing_details| inline, rather
+ // than just clearing the fields. The reason for this complexity is because
+ // PerformanceNavigationTiming inherits and shares many of the same fields
+ // exposed by PerformanceResourceTiming, but the underlying behavior is a
+ // little different.
+ bool allow_timing_details;
+ bool allow_redirect_details;
+
+ // Normally, the timestamps are relative to the time origin. In most cases,
+ // these timestamps should be positive value, so 0 is used to mark invalid
+ // negative values.
+ //
+ // However, ServiceWorker navigation preloads may be negative, since these
+ // requests may be started before the service worker started. In those cases,
+ // this flag should be set to true.
+ bool allow_negative_values;
+
+ WebVector<WebServerTimingInfo> server_timing;
+};
+
+} // namespace blink
+
+#endif