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_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
15 #include "net/base/load_states.h" | 15 #include "net/base/load_states.h" |
16 #include "net/base/net_export.h" | 16 #include "net/base/net_export.h" |
17 #include "net/base/request_priority.h" | 17 #include "net/base/request_priority.h" |
18 #include "net/http/http_server_properties.h" | 18 #include "net/http/http_server_properties.h" |
19 #include "net/socket/client_socket_handle.h" | |
19 // This file can be included from net/http even though | 20 // This file can be included from net/http even though |
20 // it is in net/websockets because it doesn't | 21 // it is in net/websockets because it doesn't |
21 // introduce any link dependency to net/websockets. | 22 // introduce any link dependency to net/websockets. |
22 #include "net/websockets/websocket_handshake_stream_base.h" | 23 #include "net/websockets/websocket_handshake_stream_base.h" |
23 | 24 |
24 class GURL; | 25 class GURL; |
25 | 26 |
26 namespace base { | 27 namespace base { |
27 class Value; | 28 class Value; |
28 } | 29 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 virtual LoadState GetLoadState() const = 0; | 164 virtual LoadState GetLoadState() const = 0; |
164 | 165 |
165 // Returns true if TLS/NPN was negotiated for this stream. | 166 // Returns true if TLS/NPN was negotiated for this stream. |
166 virtual bool was_npn_negotiated() const = 0; | 167 virtual bool was_npn_negotiated() const = 0; |
167 | 168 |
168 // Protocol negotiated with the server. | 169 // Protocol negotiated with the server. |
169 virtual NextProto protocol_negotiated() const = 0; | 170 virtual NextProto protocol_negotiated() const = 0; |
170 | 171 |
171 // Returns true if this stream is being fetched over SPDY. | 172 // Returns true if this stream is being fetched over SPDY. |
172 virtual bool using_spdy() const = 0; | 173 virtual bool using_spdy() const = 0; |
174 | |
175 // Returns socket-layer connection attempts made for this stream request. | |
176 virtual const ClientSocketHandle::ConnectionAttempts& connection_attempts() | |
Ryan Hamilton
2015/03/17 03:22:28
If this struct is going to be used outside of the
Deprecated (see juliatuttle)
2015/03/23 17:45:35
Yeah, I agree, but I'm not sure where. I suppose I
Ryan Hamilton
2015/03/24 19:20:19
My vote would go for net/socket/connection_attempt
| |
177 const = 0; | |
173 }; | 178 }; |
174 | 179 |
175 // The HttpStreamFactory defines an interface for creating usable HttpStreams. | 180 // The HttpStreamFactory defines an interface for creating usable HttpStreams. |
176 class NET_EXPORT HttpStreamFactory { | 181 class NET_EXPORT HttpStreamFactory { |
177 public: | 182 public: |
178 virtual ~HttpStreamFactory(); | 183 virtual ~HttpStreamFactory(); |
179 | 184 |
180 void ProcessAlternateProtocol( | 185 void ProcessAlternateProtocol( |
181 const base::WeakPtr<HttpServerProperties>& http_server_properties, | 186 const base::WeakPtr<HttpServerProperties>& http_server_properties, |
182 const std::vector<std::string>& alternate_protocol_values, | 187 const std::vector<std::string>& alternate_protocol_values, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 | 241 |
237 private: | 242 private: |
238 static bool spdy_enabled_; | 243 static bool spdy_enabled_; |
239 | 244 |
240 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 245 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
241 }; | 246 }; |
242 | 247 |
243 } // namespace net | 248 } // namespace net |
244 | 249 |
245 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 250 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |