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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 STATE_RESTART_TUNNEL_AUTH_COMPLETE, | 120 STATE_RESTART_TUNNEL_AUTH_COMPLETE, |
121 STATE_CREATE_STREAM, | 121 STATE_CREATE_STREAM, |
122 STATE_CREATE_STREAM_COMPLETE, | 122 STATE_CREATE_STREAM_COMPLETE, |
123 STATE_DRAIN_BODY_FOR_AUTH_RESTART, | 123 STATE_DRAIN_BODY_FOR_AUTH_RESTART, |
124 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, | 124 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, |
125 STATE_DONE, | 125 STATE_DONE, |
126 STATE_NONE | 126 STATE_NONE |
127 }; | 127 }; |
128 | 128 |
129 void OnStreamReadyCallback(); | 129 void OnStreamReadyCallback(); |
130 void OnSpdySessionReadyCallback(); | 130 void OnWebSocketStreamReadyCallback(); |
| 131 // This callback function is called when a new SPDY session is created. |
| 132 void OnNewSpdySessionReadyCallback(); |
131 void OnStreamFailedCallback(int result); | 133 void OnStreamFailedCallback(int result); |
132 void OnCertificateErrorCallback(int result, const SSLInfo& ssl_info); | 134 void OnCertificateErrorCallback(int result, const SSLInfo& ssl_info); |
133 void OnNeedsProxyAuthCallback(const HttpResponseInfo& response_info, | 135 void OnNeedsProxyAuthCallback(const HttpResponseInfo& response_info, |
134 HttpAuthController* auth_controller); | 136 HttpAuthController* auth_controller); |
135 void OnNeedsClientAuthCallback(SSLCertRequestInfo* cert_info); | 137 void OnNeedsClientAuthCallback(SSLCertRequestInfo* cert_info); |
136 void OnHttpsProxyTunnelResponseCallback(const HttpResponseInfo& response_info, | 138 void OnHttpsProxyTunnelResponseCallback(const HttpResponseInfo& response_info, |
137 HttpStream* stream); | 139 HttpStream* stream); |
138 void OnPreconnectsComplete(); | 140 void OnPreconnectsComplete(); |
139 | 141 |
140 void OnIOComplete(int result); | 142 void OnIOComplete(int result); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 int spdy_certificate_error_; | 287 int spdy_certificate_error_; |
286 | 288 |
287 scoped_refptr<HttpAuthController> | 289 scoped_refptr<HttpAuthController> |
288 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; | 290 auth_controllers_[HttpAuth::AUTH_NUM_TARGETS]; |
289 | 291 |
290 // True when the tunnel is in the process of being established - we can't | 292 // True when the tunnel is in the process of being established - we can't |
291 // read from the socket until the tunnel is done. | 293 // read from the socket until the tunnel is done. |
292 bool establishing_tunnel_; | 294 bool establishing_tunnel_; |
293 | 295 |
294 scoped_ptr<HttpStream> stream_; | 296 scoped_ptr<HttpStream> stream_; |
| 297 scoped_ptr<WebSocketStreamBase> websocket_stream_; |
295 | 298 |
296 // True if we negotiated NPN. | 299 // True if we negotiated NPN. |
297 bool was_npn_negotiated_; | 300 bool was_npn_negotiated_; |
298 | 301 |
299 // Protocol negotiated with the server. | 302 // Protocol negotiated with the server. |
300 NextProto protocol_negotiated_; | 303 NextProto protocol_negotiated_; |
301 | 304 |
302 // 0 if we're not preconnecting. Otherwise, the number of streams to | 305 // 0 if we're not preconnecting. Otherwise, the number of streams to |
303 // preconnect. | 306 // preconnect. |
304 int num_streams_; | 307 int num_streams_; |
(...skipping 14 matching lines...) Expand all Loading... |
319 bool existing_available_pipeline_; | 322 bool existing_available_pipeline_; |
320 | 323 |
321 base::WeakPtrFactory<Job> ptr_factory_; | 324 base::WeakPtrFactory<Job> ptr_factory_; |
322 | 325 |
323 DISALLOW_COPY_AND_ASSIGN(Job); | 326 DISALLOW_COPY_AND_ASSIGN(Job); |
324 }; | 327 }; |
325 | 328 |
326 } // namespace net | 329 } // namespace net |
327 | 330 |
328 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 331 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
OLD | NEW |