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/chromium/quic_chromium_client_session.h" | 5 #include "net/quic/chromium/quic_chromium_client_session.h" |
6 | 6 |
7 #include <openssl/ssl.h> | 7 #include <openssl/ssl.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 NetLog* net_log) | 227 NetLog* net_log) |
228 : QuicClientSessionBase(connection, push_promise_index, config), | 228 : QuicClientSessionBase(connection, push_promise_index, config), |
229 server_id_(server_id), | 229 server_id_(server_id), |
230 require_confirmation_(false), | 230 require_confirmation_(false), |
231 stream_factory_(stream_factory), | 231 stream_factory_(stream_factory), |
232 transport_security_state_(transport_security_state), | 232 transport_security_state_(transport_security_state), |
233 server_info_(std::move(server_info)), | 233 server_info_(std::move(server_info)), |
234 pkp_bypassed_(false), | 234 pkp_bypassed_(false), |
235 num_total_streams_(0), | 235 num_total_streams_(0), |
236 task_runner_(task_runner), | 236 task_runner_(task_runner), |
237 net_log_(BoundNetLog::Make(net_log, NetLogSourceType::QUIC_SESSION)), | 237 net_log_(NetLogWithSource::Make(net_log, NetLogSourceType::QUIC_SESSION)), |
238 logger_(new QuicConnectionLogger(this, | 238 logger_(new QuicConnectionLogger(this, |
239 connection_description, | 239 connection_description, |
240 std::move(socket_performance_watcher), | 240 std::move(socket_performance_watcher), |
241 net_log_)), | 241 net_log_)), |
242 going_away_(false), | 242 going_away_(false), |
243 port_migration_detected_(false), | 243 port_migration_detected_(false), |
244 token_binding_signatures_(kTokenBindingSignatureMapSize), | 244 token_binding_signatures_(kTokenBindingSignatureMapSize), |
245 streams_pushed_count_(0), | 245 streams_pushed_count_(0), |
246 streams_pushed_and_claimed_count_(0), | 246 streams_pushed_and_claimed_count_(0), |
247 migration_pending_(false), | 247 migration_pending_(false), |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 return; | 1090 return; |
1091 UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.ConnectionMigration", | 1091 UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.ConnectionMigration", |
1092 MIGRATION_STATUS_NO_ALTERNATE_NETWORK, | 1092 MIGRATION_STATUS_NO_ALTERNATE_NETWORK, |
1093 MIGRATION_STATUS_MAX); | 1093 MIGRATION_STATUS_MAX); |
1094 CloseSessionOnError(ERR_NETWORK_CHANGED, | 1094 CloseSessionOnError(ERR_NETWORK_CHANGED, |
1095 QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK); | 1095 QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK); |
1096 } | 1096 } |
1097 | 1097 |
1098 void QuicChromiumClientSession::OnNetworkConnected( | 1098 void QuicChromiumClientSession::OnNetworkConnected( |
1099 NetworkChangeNotifier::NetworkHandle network, | 1099 NetworkChangeNotifier::NetworkHandle network, |
1100 const BoundNetLog& bound_net_log) { | 1100 const NetLogWithSource& net_log) { |
1101 // If migration_pending_ is false, there was no migration pending or | 1101 // If migration_pending_ is false, there was no migration pending or |
1102 // an earlier task completed migration. | 1102 // an earlier task completed migration. |
1103 if (!migration_pending_) | 1103 if (!migration_pending_) |
1104 return; | 1104 return; |
1105 | 1105 |
1106 // TODO(jri): Ensure that OnSessionGoingAway is called consistently, | 1106 // TODO(jri): Ensure that OnSessionGoingAway is called consistently, |
1107 // and that it's always called at the same time in the whole | 1107 // and that it's always called at the same time in the whole |
1108 // migration process. Allows tests to be more uniform. | 1108 // migration process. Allows tests to be more uniform. |
1109 stream_factory_->OnSessionGoingAway(this); | 1109 stream_factory_->OnSessionGoingAway(this); |
1110 stream_factory_->MigrateSessionToNewNetwork( | 1110 stream_factory_->MigrateSessionToNewNetwork( |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 } | 1399 } |
1400 | 1400 |
1401 const LoadTimingInfo::ConnectTiming& | 1401 const LoadTimingInfo::ConnectTiming& |
1402 QuicChromiumClientSession::GetConnectTiming() { | 1402 QuicChromiumClientSession::GetConnectTiming() { |
1403 connect_timing_.ssl_start = connect_timing_.connect_start; | 1403 connect_timing_.ssl_start = connect_timing_.connect_start; |
1404 connect_timing_.ssl_end = connect_timing_.connect_end; | 1404 connect_timing_.ssl_end = connect_timing_.connect_end; |
1405 return connect_timing_; | 1405 return connect_timing_; |
1406 } | 1406 } |
1407 | 1407 |
1408 } // namespace net | 1408 } // namespace net |
OLD | NEW |