| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_dispatcher.h" | 5 #include "net/quic/quic_dispatcher.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 | 8 |
| 9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 this); | 375 this); |
| 376 session->InitializeSession(crypto_config_); | 376 session->InitializeSession(crypto_config_); |
| 377 return session; | 377 return session; |
| 378 } | 378 } |
| 379 | 379 |
| 380 QuicConnection* QuicDispatcher::CreateQuicConnection( | 380 QuicConnection* QuicDispatcher::CreateQuicConnection( |
| 381 QuicConnectionId connection_id, | 381 QuicConnectionId connection_id, |
| 382 const IPEndPoint& server_address, | 382 const IPEndPoint& server_address, |
| 383 const IPEndPoint& client_address) { | 383 const IPEndPoint& client_address) { |
| 384 if (FLAGS_enable_quic_stream_flow_control_2 && | 384 if (FLAGS_enable_quic_stream_flow_control_2 && |
| 385 FLAGS_enable_quic_connection_flow_control) { | 385 FLAGS_enable_quic_connection_flow_control_2) { |
| 386 DVLOG(1) << "Creating QuicDispatcher with all versions."; | 386 DVLOG(1) << "Creating QuicDispatcher with all versions."; |
| 387 return new QuicConnection(connection_id, client_address, helper_, | 387 return new QuicConnection(connection_id, client_address, helper_, |
| 388 writer_.get(), true, supported_versions_); | 388 writer_.get(), true, supported_versions_); |
| 389 } | 389 } |
| 390 | 390 |
| 391 if (FLAGS_enable_quic_stream_flow_control_2 && | 391 if (FLAGS_enable_quic_stream_flow_control_2 && |
| 392 !FLAGS_enable_quic_connection_flow_control) { | 392 !FLAGS_enable_quic_connection_flow_control_2) { |
| 393 DVLOG(1) << "Connection flow control disabled, creating QuicDispatcher " | 393 DVLOG(1) << "Connection flow control disabled, creating QuicDispatcher " |
| 394 << "WITHOUT version 19 or higher."; | 394 << "WITHOUT version 19 or higher."; |
| 395 return new QuicConnection(connection_id, client_address, helper_, | 395 return new QuicConnection(connection_id, client_address, helper_, |
| 396 writer_.get(), true, | 396 writer_.get(), true, |
| 397 supported_versions_no_connection_flow_control_); | 397 supported_versions_no_connection_flow_control_); |
| 398 } | 398 } |
| 399 | 399 |
| 400 DVLOG(1) << "Flow control disabled, creating QuicDispatcher WITHOUT " | 400 DVLOG(1) << "Flow control disabled, creating QuicDispatcher WITHOUT " |
| 401 << "version 17 or higher."; | 401 << "version 17 or higher."; |
| 402 return new QuicConnection(connection_id, client_address, helper_, | 402 return new QuicConnection(connection_id, client_address, helper_, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 420 // be parsed correctly. | 420 // be parsed correctly. |
| 421 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( | 421 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( |
| 422 header.connection_id)); | 422 header.connection_id)); |
| 423 | 423 |
| 424 // Continue parsing the packet to extract the sequence number. Then | 424 // Continue parsing the packet to extract the sequence number. Then |
| 425 // send it to the time wait manager in OnUnathenticatedHeader. | 425 // send it to the time wait manager in OnUnathenticatedHeader. |
| 426 return true; | 426 return true; |
| 427 } | 427 } |
| 428 | 428 |
| 429 } // namespace net | 429 } // namespace net |
| OLD | NEW |