Chromium Code Reviews| 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 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ | 5 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ | 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "net/base/address_list.h" | 17 #include "net/base/address_list.h" |
| 18 #include "net/base/completion_callback.h" | 18 #include "net/base/completion_callback.h" |
| 19 #include "net/base/host_port_pair.h" | 19 #include "net/base/host_port_pair.h" |
| 20 #include "net/base/network_change_notifier.h" | 20 #include "net/base/network_change_notifier.h" |
| 21 #include "net/cert/cert_database.h" | 21 #include "net/cert/cert_database.h" |
| 22 #include "net/http/http_server_properties.h" | |
| 22 #include "net/log/net_log.h" | 23 #include "net/log/net_log.h" |
| 23 #include "net/proxy/proxy_server.h" | 24 #include "net/proxy/proxy_server.h" |
| 24 #include "net/quic/network_connection.h" | 25 #include "net/quic/network_connection.h" |
| 25 #include "net/quic/quic_chromium_client_session.h" | 26 #include "net/quic/quic_chromium_client_session.h" |
| 26 #include "net/quic/quic_config.h" | 27 #include "net/quic/quic_config.h" |
| 27 #include "net/quic/quic_crypto_stream.h" | 28 #include "net/quic/quic_crypto_stream.h" |
| 28 #include "net/quic/quic_http_stream.h" | 29 #include "net/quic/quic_http_stream.h" |
| 29 #include "net/quic/quic_protocol.h" | 30 #include "net/quic/quic_protocol.h" |
| 30 #include "net/ssl/ssl_config_service.h" | 31 #include "net/ssl/ssl_config_service.h" |
| 31 | 32 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 int threshold_timeouts_with_streams_open, | 141 int threshold_timeouts_with_streams_open, |
| 141 int threshold_public_resets_post_handshake, | 142 int threshold_public_resets_post_handshake, |
| 142 int socket_receive_buffer_size, | 143 int socket_receive_buffer_size, |
| 143 bool delay_tcp_race, | 144 bool delay_tcp_race, |
| 144 bool store_server_configs_in_properties, | 145 bool store_server_configs_in_properties, |
| 145 bool close_sessions_on_ip_change, | 146 bool close_sessions_on_ip_change, |
| 146 int idle_connection_timeout_seconds, | 147 int idle_connection_timeout_seconds, |
| 147 const QuicTagVector& connection_options); | 148 const QuicTagVector& connection_options); |
| 148 ~QuicStreamFactory() override; | 149 ~QuicStreamFactory() override; |
| 149 | 150 |
| 151 // Returns true if a matching session already exists. | |
|
Ryan Hamilton
2015/12/18 17:52:51
I might say something like:
// Returns true if th
Zhongyi Shi
2015/12/18 21:59:29
Done.
| |
| 152 bool CanPool(HostPortPair host_port_pair, | |
| 153 PrivacyMode privacy_mode, | |
|
Ryan Hamilton
2015/12/18 17:52:51
Your call, but I would make this take a QuicServer
Zhongyi Shi
2015/12/18 21:59:29
Done.
| |
| 154 StringPiece origin_host); | |
| 155 | |
| 150 // Creates a new QuicHttpStream to |host_port_pair| which will be | 156 // Creates a new QuicHttpStream to |host_port_pair| which will be |
| 151 // owned by |request|. | 157 // owned by |request|. |
| 152 // If a matching session already exists, this method will return OK. If no | 158 // If a matching session already exists, this method will return OK. If no |
| 153 // matching session exists, this will return ERR_IO_PENDING and will invoke | 159 // matching session exists, this will return ERR_IO_PENDING and will invoke |
| 154 // OnRequestComplete asynchronously. | 160 // OnRequestComplete asynchronously. |
| 155 int Create(const HostPortPair& host_port_pair, | 161 int Create(const HostPortPair& host_port_pair, |
| 156 PrivacyMode privacy_mode, | 162 PrivacyMode privacy_mode, |
| 157 int cert_verify_flags, | 163 int cert_verify_flags, |
| 158 base::StringPiece origin_host, | 164 base::StringPiece origin_host, |
| 159 base::StringPiece method, | 165 base::StringPiece method, |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 469 base::TaskRunner* task_runner_; | 475 base::TaskRunner* task_runner_; |
| 470 | 476 |
| 471 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 477 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 472 | 478 |
| 473 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 479 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 474 }; | 480 }; |
| 475 | 481 |
| 476 } // namespace net | 482 } // namespace net |
| 477 | 483 |
| 478 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 484 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |