From 1f8686901db04365ef40dbd6f0ff5b4e839826fb Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Thu, 7 Mar 2013 16:52:52 -0500 Subject: [PATCH] bug 848360 - telemetry for ssl ratios of http transactions and page loads r=jduell --- netwerk/protocol/http/nsHttpChannel.cpp | 9 +++++++++ toolkit/components/telemetry/Histograms.json | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index ddff8f72b9c..7f865be45ab 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -1163,6 +1163,15 @@ nsHttpChannel::ProcessResponse() nsresult rv; uint32_t httpStatus = mResponseHead->Status(); + // Gather data on whether the transaction and page (if this is + // the initial page load) is being loaded with SSL. + Telemetry::Accumulate(Telemetry::HTTP_TRANSACTION_IS_SSL, + mConnectionInfo->UsingSSL()); + if (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI) { + Telemetry::Accumulate(Telemetry::HTTP_PAGELOAD_IS_SSL, + mConnectionInfo->UsingSSL()); + } + LOG(("nsHttpChannel::ProcessResponse [this=%p httpStatus=%u]\n", this, httpStatus)); diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 7f257a97f14..32ea15aafab 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -815,6 +815,14 @@ "n_values": 8, "description": "HTTP Proxy Type (none, http, socks)" }, + "HTTP_TRANSACTION_IS_SSL": { + "kind": "boolean", + "description": "Whether a HTTP transaction was over SSL or not." + }, + "HTTP_PAGELOAD_IS_SSL": { + "kind": "boolean", + "description": "Whether a HTTP base page load was over SSL or not." + }, "SSL_HANDSHAKE_VERSION": { "kind": "enumerated", "n_values": 16,