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_REQUEST_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
11 #include "net/http/http_stream_factory_impl.h" | 11 #include "net/http/http_stream_factory_impl.h" |
12 #include "net/socket/ssl_client_socket.h" | 12 #include "net/socket/ssl_client_socket.h" |
13 #include "net/spdy/spdy_session_key.h" | 13 #include "net/spdy/spdy_session_key.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 class ClientSocketHandle; | 18 class ClientSocketHandle; |
19 class HttpStream; | |
20 class SpdySession; | 19 class SpdySession; |
21 | 20 |
22 class HttpStreamFactoryImpl::Request : public HttpStreamRequest { | 21 class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
23 public: | 22 public: |
24 Request(const GURL& url, | 23 Request(const GURL& url, |
25 HttpStreamFactoryImpl* factory, | 24 HttpStreamFactoryImpl* factory, |
26 HttpStreamRequest::Delegate* delegate, | 25 HttpStreamRequest::Delegate* delegate, |
27 WebSocketHandshakeStreamBase::CreateHelper* | 26 WebSocketHandshakeStreamBase::CreateHelper* |
28 websocket_handshake_stream_create_helper, | 27 websocket_handshake_stream_create_helper, |
29 const BoundNetLog& net_log); | 28 const BoundNetLog& net_log); |
(...skipping 28 matching lines...) Expand all Loading... |
58 // If this Request has a |spdy_session_key_|, remove this session from the | 57 // If this Request has a |spdy_session_key_|, remove this session from the |
59 // SpdySessionRequestMap. | 58 // SpdySessionRequestMap. |
60 void RemoveRequestFromSpdySessionRequestMap(); | 59 void RemoveRequestFromSpdySessionRequestMap(); |
61 | 60 |
62 // If this Request has a |http_pipelining_key_|, remove this session from the | 61 // If this Request has a |http_pipelining_key_|, remove this session from the |
63 // HttpPipeliningRequestMap. | 62 // HttpPipeliningRequestMap. |
64 void RemoveRequestFromHttpPipeliningRequestMap(); | 63 void RemoveRequestFromHttpPipeliningRequestMap(); |
65 | 64 |
66 // Called by an attached Job if it sets up a SpdySession. | 65 // Called by an attached Job if it sets up a SpdySession. |
67 void OnNewSpdySessionReady(Job* job, | 66 void OnNewSpdySessionReady(Job* job, |
68 scoped_ptr<HttpStream> stream, | |
69 const base::WeakPtr<SpdySession>& spdy_session, | 67 const base::WeakPtr<SpdySession>& spdy_session, |
70 bool direct); | 68 bool direct); |
71 | 69 |
72 WebSocketHandshakeStreamBase::CreateHelper* | 70 WebSocketHandshakeStreamBase::CreateHelper* |
73 websocket_handshake_stream_create_helper() { | 71 websocket_handshake_stream_create_helper() { |
74 return websocket_handshake_stream_create_helper_; | 72 return websocket_handshake_stream_create_helper_; |
75 } | 73 } |
76 | 74 |
77 // HttpStreamRequest::Delegate methods which we implement. Note we don't | 75 // HttpStreamRequest::Delegate methods which we implement. Note we don't |
78 // actually subclass HttpStreamRequest::Delegate. | 76 // actually subclass HttpStreamRequest::Delegate. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Protocol negotiated with the server. | 142 // Protocol negotiated with the server. |
145 NextProto protocol_negotiated_; | 143 NextProto protocol_negotiated_; |
146 bool using_spdy_; | 144 bool using_spdy_; |
147 | 145 |
148 DISALLOW_COPY_AND_ASSIGN(Request); | 146 DISALLOW_COPY_AND_ASSIGN(Request); |
149 }; | 147 }; |
150 | 148 |
151 } // namespace net | 149 } // namespace net |
152 | 150 |
153 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ | 151 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ |
OLD | NEW |