From a9eee1c7c727ef42a15d86e9fa7b77ff0e63840a Mon Sep 17 00:00:00 2001 From: Seth Hampson Date: Fri, 19 Apr 2019 00:46:45 +0000 Subject: [PATCH] Adds usage counters to RTCQuicTransport. Adds usage counters for the datagram APIs on the RTCQuicTransport for the origin trial. Bug: 874296 Change-Id: Ifb3490b8bf0d3221f29c65a2d91830dbb8aeabd9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1573808 Commit-Queue: Seth Hampson Commit-Queue: Daniel Cheng Auto-Submit: Seth Hampson Reviewed-by: Daniel Cheng Reviewed-by: Steve Anton Cr-Commit-Position: refs/heads/master@{#652427} --- .../blink/public/mojom/web_feature/web_feature.mojom | 4 ++++ .../modules/peerconnection/rtc_quic_transport.idl | 8 ++++---- tools/metrics/histograms/enums.xml | 5 +++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/third_party/blink/public/mojom/web_feature/web_feature.mojom b/third_party/blink/public/mojom/web_feature/web_feature.mojom index 7a722c6643cb0b..a7f369ed2a6196 100644 --- a/third_party/blink/public/mojom/web_feature/web_feature.mojom +++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom @@ -2271,6 +2271,10 @@ enum WebFeature { kHidDeviceSendReport = 2864, kHidGetDevices = 2865, kHidRequestDevice = 2866, + kV8RTCQuicTransport_MaxDatagramLength_AttributeGetter = 2867, + kV8RTCQuicTransport_ReadyToSendDatagram_Method = 2868, + kV8RTCQuicTransport_SendDatagram_Method = 2869, + kV8RTCQuicTransport_ReceiveDatagrams_Method = 2870, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots. diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_quic_transport.idl b/third_party/blink/renderer/modules/peerconnection/rtc_quic_transport.idl index 296aa95886751a..bd4055ad9e9ae2 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_quic_transport.idl +++ b/third_party/blink/renderer/modules/peerconnection/rtc_quic_transport.idl @@ -23,16 +23,16 @@ enum RTCQuicTransportState { ] interface RTCQuicTransport : EventTarget { [Measure] readonly attribute RTCIceTransport transport; [Measure] readonly attribute RTCQuicTransportState state; - readonly attribute unsigned short? maxDatagramLength; + [Measure] readonly attribute unsigned short? maxDatagramLength; [Measure] ArrayBuffer getKey(); [Measure, RaisesException] void connect(); [Measure, RaisesException] void listen(BufferSource remote_key); [Measure] void stop(); [Measure, RaisesException] RTCQuicStream createStream(); - [CallWith=ScriptState, RaisesException] + [CallWith=ScriptState, Measure, RaisesException] Promise readyToSendDatagram(); - [RaisesException] void sendDatagram(BufferSource data); - [CallWith=ScriptState, RaisesException] + [Measure, RaisesException] void sendDatagram(BufferSource data); + [CallWith=ScriptState, Measure, RaisesException] Promise> receiveDatagrams(); [CallWith=ScriptState, Measure, RaisesException] Promise getStats(); diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 94b31f3c64fc63..2029551362fe9c 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml @@ -22873,6 +22873,11 @@ Called by update_net_error_codes.py.--> + + + +