summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorrch <rch@chromium.org>2014-10-01 19:58:23 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-02 02:58:38 +0000
commit413cdda9719e7e8b4e9410a9b9630e684e29fc0c (patch)
treeaf4b2b628959ff3f4ee068945fcd429e8f2b4e08 /net/http
parentc9089fa21c59d9797398e660e4943b9423db1296 (diff)
downloadchromium_src-413cdda9719e7e8b4e9410a9b9630e684e29fc0c.zip
chromium_src-413cdda9719e7e8b4e9410a9b9630e684e29fc0c.tar.gz
chromium_src-413cdda9719e7e8b4e9410a9b9630e684e29fc0c.tar.bz2
Fix bug in ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING histogram
in which we would consider the mapping to be missing even if the probability was such that we would not honor the advertisement. BUG= Review URL: https://codereview.chromium.org/620753007 Cr-Commit-Position: refs/heads/master@{#297773}
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_server_properties_impl.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index 26575e6..c55f32b 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -283,11 +283,13 @@ void HttpServerPropertiesImpl::SetAlternateProtocol(
<< "].";
}
} else {
- // TODO(rch): Consider the case where multiple requests are started
- // before the first completes. In this case, only one of the jobs
- // would reach this code, whereas all of them should should have.
- HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING,
- alternate_protocol_experiment_);
+ if (alternate_probability >= alternate_protocol_probability_threshold_) {
+ // TODO(rch): Consider the case where multiple requests are started
+ // before the first completes. In this case, only one of the jobs
+ // would reach this code, whereas all of them should should have.
+ HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_MAPPING_MISSING,
+ alternate_protocol_experiment_);
+ }
}
alternate_protocol_map_.Put(server, alternate);