diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 11:52:50 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 11:52:50 +0100 |
commit | 644e9db1092df1477b1facc52cd3ee45ebd13040 (patch) | |
tree | b126bae065184d0d39abee3fb9ba83a6c4ab7508 /netwerk/base | |
parent | 228d252ab14f65f8433c8d53122a7d1e9429c23e (diff) | |
download | UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar.gz UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar.lz UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.tar.xz UXP-644e9db1092df1477b1facc52cd3ee45ebd13040.zip |
DevTools - network - implement the secureConnectionStart property for the PerformanceTiming
https://github.com/MoonchildProductions/moebius/pull/116
("/testing" and "/toolkit" in in the previous commit)
Diffstat (limited to 'netwerk/base')
-rw-r--r-- | netwerk/base/nsISocketTransport.idl | 2 | ||||
-rw-r--r-- | netwerk/base/nsITimedChannel.idl | 2 | ||||
-rw-r--r-- | netwerk/base/nsLoadGroup.cpp | 13 |
3 files changed, 16 insertions, 1 deletions
diff --git a/netwerk/base/nsISocketTransport.idl b/netwerk/base/nsISocketTransport.idl index 6395d6b5f..9b5bc23fb 100644 --- a/netwerk/base/nsISocketTransport.idl +++ b/netwerk/base/nsISocketTransport.idl @@ -162,6 +162,8 @@ interface nsISocketTransport : nsITransport const unsigned long STATUS_SENDING_TO = 0x804b0005; const unsigned long STATUS_WAITING_FOR = 0x804b000a; const unsigned long STATUS_RECEIVING_FROM = 0x804b0006; + const unsigned long STATUS_TLS_HANDSHAKE_STARTING = 0x804b000c; + const unsigned long STATUS_TLS_HANDSHAKE_ENDED = 0x804b000d; /** * connectionFlags is a bitmask that can be used to modify underlying diff --git a/netwerk/base/nsITimedChannel.idl b/netwerk/base/nsITimedChannel.idl index 6ec2d1ff8..13b65e7b8 100644 --- a/netwerk/base/nsITimedChannel.idl +++ b/netwerk/base/nsITimedChannel.idl @@ -31,6 +31,7 @@ interface nsITimedChannel : nsISupports { [noscript] readonly attribute TimeStamp domainLookupStart; [noscript] readonly attribute TimeStamp domainLookupEnd; [noscript] readonly attribute TimeStamp connectStart; + [noscript] readonly attribute TimeStamp secureConnectionStart; [noscript] readonly attribute TimeStamp connectEnd; [noscript] readonly attribute TimeStamp requestStart; [noscript] readonly attribute TimeStamp responseStart; @@ -69,6 +70,7 @@ interface nsITimedChannel : nsISupports { readonly attribute PRTime domainLookupStartTime; readonly attribute PRTime domainLookupEndTime; readonly attribute PRTime connectStartTime; + readonly attribute PRTime secureConnectionStartTime; readonly attribute PRTime connectEndTime; readonly attribute PRTime requestStartTime; readonly attribute PRTime responseStartTime; diff --git a/netwerk/base/nsLoadGroup.cpp b/netwerk/base/nsLoadGroup.cpp index 3b8cf4434..7b75f7942 100644 --- a/netwerk/base/nsLoadGroup.cpp +++ b/netwerk/base/nsLoadGroup.cpp @@ -888,6 +888,11 @@ nsLoadGroup::TelemetryReportChannel(nsITimedChannel *aTimedChannel, if (NS_FAILED(rv)) return; + TimeStamp secureConnectionStart; + rv = aTimedChannel->GetSecureConnectionStart(&secureConnectionStart); + if (NS_FAILED(rv)) + return; + TimeStamp connectEnd; rv = aTimedChannel->GetConnectEnd(&connectEnd); if (NS_FAILED(rv)) @@ -921,9 +926,15 @@ nsLoadGroup::TelemetryReportChannel(nsITimedChannel *aTimedChannel, domainLookupStart, domainLookupEnd); \ } \ \ + if (!secureConnectionStart.IsNull() && !connectEnd.IsNull()) { \ + Telemetry::AccumulateTimeDelta( \ + Telemetry::HTTP_##prefix##_TLS_HANDSHAKE, \ + secureConnectionStart, connectEnd); \ + } \ + \ if (!connectStart.IsNull() && !connectEnd.IsNull()) { \ Telemetry::AccumulateTimeDelta( \ - Telemetry::HTTP_##prefix##_TCP_CONNECTION, \ + Telemetry::HTTP_##prefix##_TCP_CONNECTION_2, \ connectStart, connectEnd); \ } \ \ |