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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 this); | 372 this); |
373 session->InitializeSession(crypto_config_); | 373 session->InitializeSession(crypto_config_); |
374 return session; | 374 return session; |
375 } | 375 } |
376 | 376 |
377 QuicConnection* QuicDispatcher::CreateQuicConnection( | 377 QuicConnection* QuicDispatcher::CreateQuicConnection( |
378 QuicConnectionId connection_id, | 378 QuicConnectionId connection_id, |
379 const IPEndPoint& server_address, | 379 const IPEndPoint& server_address, |
380 const IPEndPoint& client_address) { | 380 const IPEndPoint& client_address) { |
381 if (FLAGS_enable_quic_stream_flow_control_2 && | 381 if (FLAGS_enable_quic_stream_flow_control_2 && |
382 FLAGS_enable_quic_connection_flow_control) { | 382 FLAGS_enable_quic_connection_flow_control_2) { |
383 DVLOG(1) << "Creating QuicDispatcher with all versions."; | 383 DVLOG(1) << "Creating QuicDispatcher with all versions."; |
384 return new QuicConnection(connection_id, client_address, helper_, | 384 return new QuicConnection(connection_id, client_address, helper_, |
385 writer_.get(), true, supported_versions_); | 385 writer_.get(), true, supported_versions_); |
386 } | 386 } |
387 | 387 |
388 if (FLAGS_enable_quic_stream_flow_control_2 && | 388 if (FLAGS_enable_quic_stream_flow_control_2 && |
389 !FLAGS_enable_quic_connection_flow_control) { | 389 !FLAGS_enable_quic_connection_flow_control_2) { |
390 DVLOG(1) << "Connection flow control disabled, creating QuicDispatcher " | 390 DVLOG(1) << "Connection flow control disabled, creating QuicDispatcher " |
391 << "WITHOUT version 19 or higher."; | 391 << "WITHOUT version 19 or higher."; |
392 return new QuicConnection(connection_id, client_address, helper_, | 392 return new QuicConnection(connection_id, client_address, helper_, |
393 writer_.get(), true, | 393 writer_.get(), true, |
394 supported_versions_no_connection_flow_control_); | 394 supported_versions_no_connection_flow_control_); |
395 } | 395 } |
396 | 396 |
397 DVLOG(1) << "Flow control disabled, creating QuicDispatcher WITHOUT " | 397 DVLOG(1) << "Flow control disabled, creating QuicDispatcher WITHOUT " |
398 << "version 17 or higher."; | 398 << "version 17 or higher."; |
399 return new QuicConnection(connection_id, client_address, helper_, | 399 return new QuicConnection(connection_id, client_address, helper_, |
(...skipping 17 matching lines...) Expand all Loading... |
417 // be parsed correctly. | 417 // be parsed correctly. |
418 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( | 418 framer_.set_version(time_wait_list_manager_->GetQuicVersionFromConnectionId( |
419 header.connection_id)); | 419 header.connection_id)); |
420 | 420 |
421 // Continue parsing the packet to extract the sequence number. Then | 421 // Continue parsing the packet to extract the sequence number. Then |
422 // send it to the time wait manager in OnUnathenticatedHeader. | 422 // send it to the time wait manager in OnUnathenticatedHeader. |
423 return true; | 423 return true; |
424 } | 424 } |
425 | 425 |
426 } // namespace net | 426 } // namespace net |
OLD | NEW |