| 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 <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); | 58 DISALLOW_COPY_AND_ASSIGN(QuicStreamRequest); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 // A factory for creating new QuicHttpStreams on top of a pool of | 61 // A factory for creating new QuicHttpStreams on top of a pool of |
| 62 // QuicClientSessions. | 62 // QuicClientSessions. |
| 63 class NET_EXPORT_PRIVATE QuicStreamFactory { | 63 class NET_EXPORT_PRIVATE QuicStreamFactory { |
| 64 public: | 64 public: |
| 65 QuicStreamFactory(HostResolver* host_resolver, | 65 QuicStreamFactory(HostResolver* host_resolver, |
| 66 ClientSocketFactory* client_socket_factory, | 66 ClientSocketFactory* client_socket_factory, |
| 67 QuicRandom* random_generator, | 67 QuicRandom* random_generator, |
| 68 QuicClock* clock, | 68 QuicClock* clock); |
| 69 bool use_spdy_over_quic); | |
| 70 virtual ~QuicStreamFactory(); | 69 virtual ~QuicStreamFactory(); |
| 71 | 70 |
| 72 // Creates a new QuicHttpStream to |host_port_proxy_pair| which will be | 71 // Creates a new QuicHttpStream to |host_port_proxy_pair| which will be |
| 73 // owned by |request|. If a matching session already exists, this | 72 // owned by |request|. If a matching session already exists, this |
| 74 // method will return OK. If no matching session exists, this will | 73 // method will return OK. If no matching session exists, this will |
| 75 // return ERR_IO_PENDING and will invoke OnRequestComplete asynchronously. | 74 // return ERR_IO_PENDING and will invoke OnRequestComplete asynchronously. |
| 76 int Create(const HostPortProxyPair& host_port_proxy_pair, | 75 int Create(const HostPortProxyPair& host_port_proxy_pair, |
| 77 const BoundNetLog& net_log, | 76 const BoundNetLog& net_log, |
| 78 QuicStreamRequest* request); | 77 QuicStreamRequest* request); |
| 79 | 78 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 SessionSet all_sessions_; | 126 SessionSet all_sessions_; |
| 128 // Contains non-owning pointers to currently active session | 127 // Contains non-owning pointers to currently active session |
| 129 // (not going away session, once they're implemented). | 128 // (not going away session, once they're implemented). |
| 130 SessionMap active_sessions_; | 129 SessionMap active_sessions_; |
| 131 SessionAliasMap session_aliases_; | 130 SessionAliasMap session_aliases_; |
| 132 | 131 |
| 133 JobMap active_jobs_; | 132 JobMap active_jobs_; |
| 134 JobRequestsMap job_requests_map_; | 133 JobRequestsMap job_requests_map_; |
| 135 RequestMap active_requests_; | 134 RequestMap active_requests_; |
| 136 | 135 |
| 137 // True of request should be encoded using SPDY header blocks. | |
| 138 bool use_spdy_over_quic_; | |
| 139 | |
| 140 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 136 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 141 | 137 |
| 142 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 138 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 143 }; | 139 }; |
| 144 | 140 |
| 145 } // namespace net | 141 } // namespace net |
| 146 | 142 |
| 147 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 143 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |