summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/NullHttpTransaction.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 11:52:50 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-01 11:52:50 +0100
commit644e9db1092df1477b1facc52cd3ee45ebd13040 (patch)
treeb126bae065184d0d39abee3fb9ba83a6c4ab7508 /netwerk/protocol/http/NullHttpTransaction.cpp
parent228d252ab14f65f8433c8d53122a7d1e9429c23e (diff)
downloadUXP-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/protocol/http/NullHttpTransaction.cpp')
-rw-r--r--netwerk/protocol/http/NullHttpTransaction.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/netwerk/protocol/http/NullHttpTransaction.cpp b/netwerk/protocol/http/NullHttpTransaction.cpp
index 965ffcc2c..bb32a8098 100644
--- a/netwerk/protocol/http/NullHttpTransaction.cpp
+++ b/netwerk/protocol/http/NullHttpTransaction.cpp
@@ -162,6 +162,30 @@ void
NullHttpTransaction::OnTransportStatus(nsITransport* transport,
nsresult status, int64_t progress)
{
+ if (status == NS_NET_STATUS_RESOLVING_HOST) {
+ if (mTimings.domainLookupStart.IsNull()) {
+ mTimings.domainLookupStart = TimeStamp::Now();
+ }
+ } else if (status == NS_NET_STATUS_RESOLVED_HOST) {
+ if (mTimings.domainLookupEnd.IsNull()) {
+ mTimings.domainLookupEnd = TimeStamp::Now();
+ }
+ } else if (status == NS_NET_STATUS_CONNECTING_TO) {
+ if (mTimings.connectStart.IsNull()) {
+ mTimings.connectStart = TimeStamp::Now();
+ }
+ } else if (status == NS_NET_STATUS_CONNECTED_TO) {
+ if (mTimings.connectEnd.IsNull()) {
+ mTimings.connectEnd = TimeStamp::Now();
+ }
+ } else if (status == NS_NET_STATUS_TLS_HANDSHAKE_ENDED) {
+ if (mTimings.secureConnectionStart.IsNull() &&
+ !mTimings.connectEnd.IsNull()) {
+ mTimings.secureConnectionStart = mTimings.connectEnd;
+ }
+ mTimings.connectEnd = TimeStamp::Now();;
+ }
+
if (mActivityDistributor) {
NS_DispatchToMainThread(new CallObserveActivity(mActivityDistributor,
mConnectionInfo->GetOrigin(),