summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/http/http_server_properties.cc6
-rw-r--r--net/http/http_server_properties.h10
-rw-r--r--net/http/http_stream_factory_impl_job.cc2
-rw-r--r--net/quic/quic_stream_factory.cc2
-rw-r--r--tools/metrics/histograms/histograms.xml13
5 files changed, 33 insertions, 0 deletions
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc
index e714d9f..9194bfe 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -37,6 +37,12 @@ void HistogramAlternateProtocolUsage(AlternateProtocolUsage usage) {
ALTERNATE_PROTOCOL_USAGE_MAX);
}
+void HistogramBrokenAlternateProtocolLocation(
+ BrokenAlternateProtocolLocation location){
+ UMA_HISTOGRAM_ENUMERATION("Net.AlternateProtocolBrokenLocation", location,
+ BROKEN_ALTERNATE_PROTOCOL_LOCATION_MAX);
+}
+
bool IsAlternateProtocolValid(AlternateProtocol protocol) {
return protocol >= ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION &&
protocol <= ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION;
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index 3d12d02..7c9fa65 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -39,6 +39,16 @@ enum AlternateProtocolUsage {
// Log a histogram to reflect |usage|.
NET_EXPORT void HistogramAlternateProtocolUsage(AlternateProtocolUsage usage);
+enum BrokenAlternateProtocolLocation {
+ BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB = 0,
+ BROKEN_ALTERNATE_PROTOCOL_LOCATION_QUIC_STREAM_FACTORY = 1,
+ BROKEN_ALTERNATE_PROTOCOL_LOCATION_MAX,
+};
+
+// Log a histogram to reflect |location|.
+NET_EXPORT void HistogramBrokenAlternateProtocolLocation(
+ BrokenAlternateProtocolLocation location);
+
enum AlternateProtocol {
DEPRECATED_NPN_SPDY_2 = 0,
ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION = DEPRECATED_NPN_SPDY_2,
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 7a8a52e..ed8f1da 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -978,6 +978,8 @@ int HttpStreamFactoryImpl::Job::DoInitConnectionComplete(int result) {
}
if (!ssl_started && result < 0 && original_url_.get()) {
+ HistogramBrokenAlternateProtocolLocation(
+ BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB);
// Mark the alternate protocol as broken and fallback.
session_->http_server_properties()->SetBrokenAlternateProtocol(
HostPortPair::FromURL(*original_url_));
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 44ed85a..791aa9b 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -563,6 +563,8 @@ void QuicStreamFactory::OnSessionGoingAway(QuicClientSession* session) {
// packets from the peer, we should consider blacklisting this
// differently so that we still race TCP but we don't consider the
// session connected until the handshake has been confirmed.
+ HistogramBrokenAlternateProtocolLocation(
+ BROKEN_ALTERNATE_PROTOCOL_LOCATION_QUIC_STREAM_FACTORY);
http_server_properties_->SetBrokenAlternateProtocol(it->host_port_pair());
UMA_HISTOGRAM_COUNTS("Net.QuicHandshakeNotConfirmedNumPacketsReceived",
stats.packets_received);
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 49cd7c5..1ecf630 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -10466,6 +10466,14 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<summary>The scheme of the URL for each main-frame navigation.</summary>
</histogram>
+<histogram name="Net.AlternateProtocolBrokenLocation"
+ enum="BrokenAlternateProtocolLocation">
+ <owner>rch@chromium.org</owner>
+ <summary>
+ Breakdown of the locations when SetBrokenAlternateProtocol is called.
+ </summary>
+</histogram>
+
<histogram name="Net.AlternateProtocolUsage" enum="AlternateProtocolUsage">
<owner>rch@chromium.org</owner>
<summary>
@@ -30858,6 +30866,11 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="1" label="Wiped out"/>
</enum>
+<enum name="BrokenAlternateProtocolLocation" type="int">
+ <int value="0" label="HTTP_STREAM_FACTORY_IMPL_JOB"/>
+ <int value="1" label="QUIC_STREAM_FACTORY"/>
+</enum>
+
<enum name="CanvasContextType" type="int">
<int value="0" label="2d"/>
<int value="1" label="webkit-3d"/>