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 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "net/http/http_stream_factory_impl.h" | 12 #include "net/http/http_stream_factory_impl.h" |
13 #include "net/log/net_log.h" | 13 #include "net/log/net_log.h" |
14 #include "net/net_features.h" | 14 #include "net/net_features.h" |
15 #include "net/socket/connection_attempts.h" | 15 #include "net/socket/connection_attempts.h" |
16 #include "net/socket/ssl_client_socket.h" | 16 #include "net/socket/ssl_client_socket.h" |
17 #include "net/spdy/spdy_session_key.h" | 17 #include "net/spdy/spdy_session_key.h" |
18 #include "net/ssl/ssl_failure_state.h" | 18 #include "net/ssl/ssl_failure_state.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 | 22 |
23 class BidirectionalStreamJob; | 23 class BidirectionalStreamJob; |
24 class ClientSocketHandle; | 24 class ClientSocketHandle; |
25 class HttpStream; | 25 class HttpStream; |
26 class SpdySession; | 26 class SpdySession; |
27 | 27 |
28 class HttpStreamFactoryImpl::Request : public HttpStreamRequest { | 28 class HttpStreamFactoryImpl::Request : public HttpStreamRequest { |
29 public: | 29 public: |
30 // Indicates which type of stream is requested. | |
31 enum StreamType { | |
32 BIDIRECTIONAL_STREAM_SPDY_JOB, | |
33 HTTP_STREAM, | |
34 }; | |
35 | |
36 Request(const GURL& url, | 30 Request(const GURL& url, |
37 HttpStreamFactoryImpl* factory, | 31 HttpStreamFactoryImpl* factory, |
38 HttpStreamRequest::Delegate* delegate, | 32 HttpStreamRequest::Delegate* delegate, |
39 WebSocketHandshakeStreamBase::CreateHelper* | 33 WebSocketHandshakeStreamBase::CreateHelper* |
40 websocket_handshake_stream_create_helper, | 34 websocket_handshake_stream_create_helper, |
41 const BoundNetLog& net_log, | 35 const BoundNetLog& net_log, |
42 StreamType stream_type); | 36 StreamType stream_type); |
43 | 37 |
44 ~Request() override; | 38 ~Request() override; |
45 | 39 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 bool using_spdy_; | 167 bool using_spdy_; |
174 ConnectionAttempts connection_attempts_; | 168 ConnectionAttempts connection_attempts_; |
175 | 169 |
176 const bool for_bidirectional_; | 170 const bool for_bidirectional_; |
177 DISALLOW_COPY_AND_ASSIGN(Request); | 171 DISALLOW_COPY_AND_ASSIGN(Request); |
178 }; | 172 }; |
179 | 173 |
180 } // namespace net | 174 } // namespace net |
181 | 175 |
182 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ | 176 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ |
OLD | NEW |