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 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 struct HttpRequestInfo; | 47 struct HttpRequestInfo; |
48 struct SSLConfig; | 48 struct SSLConfig; |
49 | 49 |
50 // The HttpStreamRequest is the client's handle to the worker object which | 50 // The HttpStreamRequest is the client's handle to the worker object which |
51 // handles the creation of an HttpStream. While the HttpStream is being | 51 // handles the creation of an HttpStream. While the HttpStream is being |
52 // created, this object is the creator's handle for interacting with the | 52 // created, this object is the creator's handle for interacting with the |
53 // HttpStream creation process. The request is cancelled by deleting it, after | 53 // HttpStream creation process. The request is cancelled by deleting it, after |
54 // which no callbacks will be invoked. | 54 // which no callbacks will be invoked. |
55 class NET_EXPORT_PRIVATE HttpStreamRequest { | 55 class NET_EXPORT_PRIVATE HttpStreamRequest { |
56 public: | 56 public: |
57 // Indicates which type of stream is requested. | |
58 enum StreamType { | |
59 BIDIRECTIONAL_STREAM_SPDY_JOB, | |
Ryan Hamilton
2016/03/03 04:14:57
This name is pretty long. How about just BIDIRECTI
xunjieli
2016/03/03 16:54:19
Done.
| |
60 HTTP_STREAM, | |
61 }; | |
62 | |
57 // The HttpStreamRequest::Delegate is a set of callback methods for a | 63 // The HttpStreamRequest::Delegate is a set of callback methods for a |
58 // HttpStreamRequestJob. Generally, only one of these methods will be | 64 // HttpStreamRequestJob. Generally, only one of these methods will be |
59 // called as a result of a stream request. | 65 // called as a result of a stream request. |
60 class NET_EXPORT_PRIVATE Delegate { | 66 class NET_EXPORT_PRIVATE Delegate { |
61 public: | 67 public: |
62 virtual ~Delegate() {} | 68 virtual ~Delegate() {} |
63 | 69 |
64 // This is the success case for RequestStream. | 70 // This is the success case for RequestStream. |
65 // |stream| is now owned by the delegate. | 71 // |stream| is now owned by the delegate. |
66 // |used_ssl_config| indicates the actual SSL configuration used for this | 72 // |used_ssl_config| indicates the actual SSL configuration used for this |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
271 static bool spdy_enabled_; | 277 static bool spdy_enabled_; |
272 | 278 |
273 HostPortPair RewriteHost(HostPortPair host_port_pair); | 279 HostPortPair RewriteHost(HostPortPair host_port_pair); |
274 | 280 |
275 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 281 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
276 }; | 282 }; |
277 | 283 |
278 } // namespace net | 284 } // namespace net |
279 | 285 |
280 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 286 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
OLD | NEW |