OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_chromium_client_session.h" | 5 #include "net/quic/quic_chromium_client_session.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 314 |
315 // Don't bother with these histogram during tests, which mock out | 315 // Don't bother with these histogram during tests, which mock out |
316 // num_sent_client_hellos(). | 316 // num_sent_client_hellos(). |
317 if (round_trip_handshakes < 0 || !stream_factory_) | 317 if (round_trip_handshakes < 0 || !stream_factory_) |
318 return; | 318 return; |
319 | 319 |
320 bool port_selected = stream_factory_->enable_port_selection(); | 320 bool port_selected = stream_factory_->enable_port_selection(); |
321 SSLInfo ssl_info; | 321 SSLInfo ssl_info; |
322 // QUIC supports only secure urls. | 322 // QUIC supports only secure urls. |
323 if (GetSSLInfo(&ssl_info) && ssl_info.cert.get()) { | 323 if (GetSSLInfo(&ssl_info) && ssl_info.cert.get()) { |
324 if (port_selected) { | 324 if (!port_selected) { |
325 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectSelectPortForHTTPS", | |
326 round_trip_handshakes, 0, 3, 4); | |
327 } else { | |
328 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS", | 325 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS", |
329 round_trip_handshakes, 0, 3, 4); | 326 round_trip_handshakes, 0, 3, 4); |
330 if (require_confirmation_) { | 327 if (require_confirmation_) { |
331 UMA_HISTOGRAM_CUSTOM_COUNTS( | 328 UMA_HISTOGRAM_CUSTOM_COUNTS( |
332 "Net.QuicSession.ConnectRandomPortRequiringConfirmationForHTTPS", | 329 "Net.QuicSession.ConnectRandomPortRequiringConfirmationForHTTPS", |
333 round_trip_handshakes, 0, 3, 4); | 330 round_trip_handshakes, 0, 3, 4); |
334 } | 331 } |
335 } | 332 } |
336 } | 333 } |
337 const QuicConnectionStats stats = connection()->GetStats(); | 334 const QuicConnectionStats stats = connection()->GetStats(); |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 } | 1187 } |
1191 | 1188 |
1192 void QuicChromiumClientSession::DeletePromised( | 1189 void QuicChromiumClientSession::DeletePromised( |
1193 QuicClientPromisedInfo* promised) { | 1190 QuicClientPromisedInfo* promised) { |
1194 if (IsOpenStream(promised->id())) | 1191 if (IsOpenStream(promised->id())) |
1195 streams_pushed_and_claimed_count_++; | 1192 streams_pushed_and_claimed_count_++; |
1196 QuicClientSessionBase::DeletePromised(promised); | 1193 QuicClientSessionBase::DeletePromised(promised); |
1197 } | 1194 } |
1198 | 1195 |
1199 } // namespace net | 1196 } // namespace net |
OLD | NEW |