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_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // connecting. | 205 // connecting. |
206 virtual void Resume(); | 206 virtual void Resume(); |
207 | 207 |
208 // Called to detach |this| Job. May resume the other Job, will disconnect | 208 // Called to detach |this| Job. May resume the other Job, will disconnect |
209 // the socket for |this| Job, and notify |delegate| upon completion. | 209 // the socket for |this| Job, and notify |delegate| upon completion. |
210 void Orphan(); | 210 void Orphan(); |
211 | 211 |
212 void SetPriority(RequestPriority priority); | 212 void SetPriority(RequestPriority priority); |
213 | 213 |
214 RequestPriority priority() const { return priority_; } | 214 RequestPriority priority() const { return priority_; } |
215 bool was_npn_negotiated() const; | 215 bool was_alpn_negotiated() const; |
216 NextProto negotiated_protocol() const; | 216 NextProto negotiated_protocol() const; |
217 bool using_spdy() const; | 217 bool using_spdy() const; |
218 const BoundNetLog& net_log() const { return net_log_; } | 218 const BoundNetLog& net_log() const { return net_log_; } |
219 HttpStreamRequest::StreamType stream_type() const { return stream_type_; } | 219 HttpStreamRequest::StreamType stream_type() const { return stream_type_; } |
220 | 220 |
221 std::unique_ptr<HttpStream> ReleaseStream() { return std::move(stream_); } | 221 std::unique_ptr<HttpStream> ReleaseStream() { return std::move(stream_); } |
222 | 222 |
223 void SetStream(HttpStream* http_stream) { stream_.reset(http_stream); } | 223 void SetStream(HttpStream* http_stream) { stream_.reset(http_stream); } |
224 | 224 |
225 std::unique_ptr<BidirectionalStreamImpl> ReleaseBidirectionalStream() { | 225 std::unique_ptr<BidirectionalStreamImpl> ReleaseBidirectionalStream() { |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; | 452 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; |
453 | 453 |
454 // True when the tunnel is in the process of being established - we can't | 454 // True when the tunnel is in the process of being established - we can't |
455 // read from the socket until the tunnel is done. | 455 // read from the socket until the tunnel is done. |
456 bool establishing_tunnel_; | 456 bool establishing_tunnel_; |
457 | 457 |
458 std::unique_ptr<HttpStream> stream_; | 458 std::unique_ptr<HttpStream> stream_; |
459 std::unique_ptr<WebSocketHandshakeStreamBase> websocket_stream_; | 459 std::unique_ptr<WebSocketHandshakeStreamBase> websocket_stream_; |
460 std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_impl_; | 460 std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_impl_; |
461 | 461 |
462 // True if we negotiated NPN. | 462 // True if we negotiated ALPN. |
463 bool was_npn_negotiated_; | 463 bool was_alpn_negotiated_; |
464 | 464 |
465 // Protocol negotiated with the server. | 465 // Protocol negotiated with the server. |
466 NextProto negotiated_protocol_; | 466 NextProto negotiated_protocol_; |
467 | 467 |
468 // 0 if we're not preconnecting. Otherwise, the number of streams to | 468 // 0 if we're not preconnecting. Otherwise, the number of streams to |
469 // preconnect. | 469 // preconnect. |
470 int num_streams_; | 470 int num_streams_; |
471 | 471 |
472 // Initialized when we create a new SpdySession. | 472 // Initialized when we create a new SpdySession. |
473 base::WeakPtr<SpdySession> new_spdy_session_; | 473 base::WeakPtr<SpdySession> new_spdy_session_; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 const SSLConfig& server_ssl_config, | 529 const SSLConfig& server_ssl_config, |
530 const SSLConfig& proxy_ssl_config, | 530 const SSLConfig& proxy_ssl_config, |
531 HostPortPair destination, | 531 HostPortPair destination, |
532 GURL origin_url, | 532 GURL origin_url, |
533 NetLog* net_log) = 0; | 533 NetLog* net_log) = 0; |
534 }; | 534 }; |
535 | 535 |
536 } // namespace net | 536 } // namespace net |
537 | 537 |
538 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 538 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
OLD | NEW |