Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: net/quic/chromium/quic_chromium_client_session.cc

Issue 2537993003: Remove the unused QUIC port selection logic. (Closed)
Patch Set: Remove obsolete tests Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/chromium/port_suggester_unittest.cc ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromium/quic_chromium_client_session.h" 5 #include "net/quic/chromium/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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 return; 349 return;
350 350
351 // Sending one client_hello means we had zero handshake-round-trips. 351 // Sending one client_hello means we had zero handshake-round-trips.
352 int round_trip_handshakes = crypto_stream_->num_sent_client_hellos() - 1; 352 int round_trip_handshakes = crypto_stream_->num_sent_client_hellos() - 1;
353 353
354 // Don't bother with these histogram during tests, which mock out 354 // Don't bother with these histogram during tests, which mock out
355 // num_sent_client_hellos(). 355 // num_sent_client_hellos().
356 if (round_trip_handshakes < 0 || !stream_factory_) 356 if (round_trip_handshakes < 0 || !stream_factory_)
357 return; 357 return;
358 358
359 bool port_selected = stream_factory_->enable_port_selection();
360 SSLInfo ssl_info; 359 SSLInfo ssl_info;
361 // QUIC supports only secure urls. 360 // QUIC supports only secure urls.
362 if (GetSSLInfo(&ssl_info) && ssl_info.cert.get()) { 361 if (GetSSLInfo(&ssl_info) && ssl_info.cert.get()) {
363 if (!port_selected) { 362 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS",
364 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.QuicSession.ConnectRandomPortForHTTPS", 363 round_trip_handshakes, 1, 3, 4);
365 round_trip_handshakes, 1, 3, 4); 364 if (require_confirmation_) {
366 if (require_confirmation_) { 365 UMA_HISTOGRAM_CUSTOM_COUNTS(
367 UMA_HISTOGRAM_CUSTOM_COUNTS( 366 "Net.QuicSession.ConnectRandomPortRequiringConfirmationForHTTPS",
368 "Net.QuicSession.ConnectRandomPortRequiringConfirmationForHTTPS", 367 round_trip_handshakes, 1, 3, 4);
369 round_trip_handshakes, 1, 3, 4);
370 }
371 } 368 }
372 } 369 }
373 const QuicConnectionStats stats = connection()->GetStats(); 370 const QuicConnectionStats stats = connection()->GetStats();
374 if (server_info_ && stats.min_rtt_us > 0) { 371 if (server_info_ && stats.min_rtt_us > 0) {
375 base::TimeTicks wait_for_data_start_time = 372 base::TimeTicks wait_for_data_start_time =
376 server_info_->wait_for_data_start_time(); 373 server_info_->wait_for_data_start_time();
377 base::TimeTicks wait_for_data_end_time = 374 base::TimeTicks wait_for_data_end_time =
378 server_info_->wait_for_data_end_time(); 375 server_info_->wait_for_data_end_time();
379 if (!wait_for_data_start_time.is_null() && 376 if (!wait_for_data_start_time.is_null() &&
380 !wait_for_data_end_time.is_null()) { 377 !wait_for_data_end_time.is_null()) {
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 connect_timing_.ssl_start = connect_timing_.connect_start; 1497 connect_timing_.ssl_start = connect_timing_.connect_start;
1501 connect_timing_.ssl_end = connect_timing_.connect_end; 1498 connect_timing_.ssl_end = connect_timing_.connect_end;
1502 return connect_timing_; 1499 return connect_timing_;
1503 } 1500 }
1504 1501
1505 QuicVersion QuicChromiumClientSession::GetQuicVersion() const { 1502 QuicVersion QuicChromiumClientSession::GetQuicVersion() const {
1506 return connection()->version(); 1503 return connection()->version();
1507 } 1504 }
1508 1505
1509 } // namespace net 1506 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/port_suggester_unittest.cc ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698