Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: net/http/http_stream_factory_impl_job.h

Issue 14813024: Introduce RequestWebSocketStream into HttpStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename delegate functions. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 STATE_RESTART_TUNNEL_AUTH_COMPLETE, 119 STATE_RESTART_TUNNEL_AUTH_COMPLETE,
120 STATE_CREATE_STREAM, 120 STATE_CREATE_STREAM,
121 STATE_CREATE_STREAM_COMPLETE, 121 STATE_CREATE_STREAM_COMPLETE,
122 STATE_DRAIN_BODY_FOR_AUTH_RESTART, 122 STATE_DRAIN_BODY_FOR_AUTH_RESTART,
123 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, 123 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE,
124 STATE_DONE, 124 STATE_DONE,
125 STATE_NONE 125 STATE_NONE
126 }; 126 };
127 127
128 void OnStreamReadyCallback(); 128 void OnStreamReadyCallback();
129 void OnSpdySessionReadyCallback(); 129 void OnSocketReadyForWebSocketCallback();
130 // This callback function is called when a spdy session is available
131 // if for_websocket() is true.
132 void OnSpdySessionReadyForWebSocketCallback();
133 // This callback function is called when a new spdy session is created
134 // if for_websocket() is false.
135 void OnNewSpdySessionReadyCallback();
130 void OnStreamFailedCallback(int result); 136 void OnStreamFailedCallback(int result);
131 void OnCertificateErrorCallback(int result, const SSLInfo& ssl_info); 137 void OnCertificateErrorCallback(int result, const SSLInfo& ssl_info);
132 void OnNeedsProxyAuthCallback(const HttpResponseInfo& response_info, 138 void OnNeedsProxyAuthCallback(const HttpResponseInfo& response_info,
133 HttpAuthController* auth_controller); 139 HttpAuthController* auth_controller);
134 void OnNeedsClientAuthCallback(SSLCertRequestInfo* cert_info); 140 void OnNeedsClientAuthCallback(SSLCertRequestInfo* cert_info);
135 void OnHttpsProxyTunnelResponseCallback(const HttpResponseInfo& response_info, 141 void OnHttpsProxyTunnelResponseCallback(const HttpResponseInfo& response_info,
136 HttpStream* stream); 142 HttpStream* stream);
137 void OnPreconnectsComplete(); 143 void OnPreconnectsComplete();
138 144
139 void OnIOComplete(int result); 145 void OnIOComplete(int result);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // 0 if we're not preconnecting. Otherwise, the number of streams to 307 // 0 if we're not preconnecting. Otherwise, the number of streams to
302 // preconnect. 308 // preconnect.
303 int num_streams_; 309 int num_streams_;
304 310
305 // Initialized when we create a new SpdySession. 311 // Initialized when we create a new SpdySession.
306 scoped_refptr<SpdySession> new_spdy_session_; 312 scoped_refptr<SpdySession> new_spdy_session_;
307 313
308 // Initialized when we have an existing SpdySession. 314 // Initialized when we have an existing SpdySession.
309 scoped_refptr<SpdySession> existing_spdy_session_; 315 scoped_refptr<SpdySession> existing_spdy_session_;
310 316
317 // A SPDY session to pass to OnSpdySessionReadyForWebSocketCallback
318 scoped_refptr<SpdySession> spdy_session_to_pass_;
319
311 // Only used if |new_spdy_session_| is non-NULL. 320 // Only used if |new_spdy_session_| is non-NULL.
312 bool spdy_session_direct_; 321 bool spdy_session_direct_;
313 322
314 // Key used to identify the HttpPipelinedHost for |request_|. 323 // Key used to identify the HttpPipelinedHost for |request_|.
315 scoped_ptr<HttpPipelinedHost::Key> http_pipelining_key_; 324 scoped_ptr<HttpPipelinedHost::Key> http_pipelining_key_;
316 325
317 // True if an existing pipeline can handle this job's request. 326 // True if an existing pipeline can handle this job's request.
318 bool existing_available_pipeline_; 327 bool existing_available_pipeline_;
319 328
320 base::WeakPtrFactory<Job> ptr_factory_; 329 base::WeakPtrFactory<Job> ptr_factory_;
321 330
322 DISALLOW_COPY_AND_ASSIGN(Job); 331 DISALLOW_COPY_AND_ASSIGN(Job);
323 }; 332 };
324 333
325 } // namespace net 334 } // namespace net
326 335
327 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ 336 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698