| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <list> | 11 #include <list> |
| 12 #include <map> | 12 #include <map> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "net/base/address_list.h" | 21 #include "net/base/address_list.h" |
| 22 #include "net/base/completion_callback.h" | 22 #include "net/base/completion_callback.h" |
| 23 #include "net/base/host_port_pair.h" | 23 #include "net/base/host_port_pair.h" |
| 24 #include "net/base/network_change_notifier.h" | 24 #include "net/base/network_change_notifier.h" |
| 25 #include "net/cert/cert_database.h" | 25 #include "net/cert/cert_database.h" |
| 26 #include "net/http/http_server_properties.h" |
| 26 #include "net/log/net_log.h" | 27 #include "net/log/net_log.h" |
| 27 #include "net/proxy/proxy_server.h" | 28 #include "net/proxy/proxy_server.h" |
| 28 #include "net/quic/network_connection.h" | 29 #include "net/quic/network_connection.h" |
| 29 #include "net/quic/quic_chromium_client_session.h" | 30 #include "net/quic/quic_chromium_client_session.h" |
| 30 #include "net/quic/quic_config.h" | 31 #include "net/quic/quic_config.h" |
| 31 #include "net/quic/quic_crypto_stream.h" | 32 #include "net/quic/quic_crypto_stream.h" |
| 32 #include "net/quic/quic_http_stream.h" | 33 #include "net/quic/quic_http_stream.h" |
| 33 #include "net/quic/quic_protocol.h" | 34 #include "net/quic/quic_protocol.h" |
| 34 #include "net/ssl/ssl_config_service.h" | 35 #include "net/ssl/ssl_config_service.h" |
| 35 | 36 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 int threshold_timeouts_with_streams_open, | 145 int threshold_timeouts_with_streams_open, |
| 145 int threshold_public_resets_post_handshake, | 146 int threshold_public_resets_post_handshake, |
| 146 int socket_receive_buffer_size, | 147 int socket_receive_buffer_size, |
| 147 bool delay_tcp_race, | 148 bool delay_tcp_race, |
| 148 bool store_server_configs_in_properties, | 149 bool store_server_configs_in_properties, |
| 149 bool close_sessions_on_ip_change, | 150 bool close_sessions_on_ip_change, |
| 150 int idle_connection_timeout_seconds, | 151 int idle_connection_timeout_seconds, |
| 151 const QuicTagVector& connection_options); | 152 const QuicTagVector& connection_options); |
| 152 ~QuicStreamFactory() override; | 153 ~QuicStreamFactory() override; |
| 153 | 154 |
| 155 // Returns true if there is an existing session to |server_id| which can be |
| 156 // used for request to |origin_host|. |
| 157 bool CanUseExistingSession(QuicServerId server_id, |
| 158 PrivacyMode privacy_mode, |
| 159 StringPiece origin_host); |
| 160 |
| 154 // Creates a new QuicHttpStream to |host_port_pair| which will be | 161 // Creates a new QuicHttpStream to |host_port_pair| which will be |
| 155 // owned by |request|. | 162 // owned by |request|. |
| 156 // If a matching session already exists, this method will return OK. If no | 163 // If a matching session already exists, this method will return OK. If no |
| 157 // matching session exists, this will return ERR_IO_PENDING and will invoke | 164 // matching session exists, this will return ERR_IO_PENDING and will invoke |
| 158 // OnRequestComplete asynchronously. | 165 // OnRequestComplete asynchronously. |
| 159 int Create(const HostPortPair& host_port_pair, | 166 int Create(const HostPortPair& host_port_pair, |
| 160 PrivacyMode privacy_mode, | 167 PrivacyMode privacy_mode, |
| 161 int cert_verify_flags, | 168 int cert_verify_flags, |
| 162 base::StringPiece origin_host, | 169 base::StringPiece origin_host, |
| 163 base::StringPiece method, | 170 base::StringPiece method, |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 base::TaskRunner* task_runner_; | 478 base::TaskRunner* task_runner_; |
| 472 | 479 |
| 473 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 480 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 474 | 481 |
| 475 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 482 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 476 }; | 483 }; |
| 477 | 484 |
| 478 } // namespace net | 485 } // namespace net |
| 479 | 486 |
| 480 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 487 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |