| Index: net/http/http_stream_factory_impl_request.cc
|
| diff --git a/net/http/http_stream_factory_impl_request.cc b/net/http/http_stream_factory_impl_request.cc
|
| index 6195552031f462bc023d920d8552089f60c4ef80..d922d41cc8ef67bef393299f8d047b3f748c7558 100644
|
| --- a/net/http/http_stream_factory_impl_request.cc
|
| +++ b/net/http/http_stream_factory_impl_request.cc
|
| @@ -16,7 +16,8 @@ namespace net {
|
| HttpStreamFactoryImpl::Request::Request(const GURL& url,
|
| HttpStreamFactoryImpl* factory,
|
| HttpStreamRequest::Delegate* delegate,
|
| - const BoundNetLog& net_log)
|
| + const BoundNetLog& net_log,
|
| + bool for_websocket)
|
| : url_(url),
|
| factory_(factory),
|
| delegate_(delegate),
|
| @@ -24,7 +25,8 @@ HttpStreamFactoryImpl::Request::Request(const GURL& url,
|
| completed_(false),
|
| was_npn_negotiated_(false),
|
| protocol_negotiated_(kProtoUnknown),
|
| - using_spdy_(false) {
|
| + using_spdy_(false),
|
| + for_websocket_(for_websocket) {
|
| DCHECK(factory_);
|
| DCHECK(delegate_);
|
|
|
| @@ -94,14 +96,7 @@ void HttpStreamFactoryImpl::Request::Complete(
|
| net_log_.source().ToEventParametersCallback());
|
| }
|
|
|
| -void HttpStreamFactoryImpl::Request::OnStreamReady(
|
| - Job* job,
|
| - const SSLConfig& used_ssl_config,
|
| - const ProxyInfo& used_proxy_info,
|
| - HttpStreamBase* stream) {
|
| - DCHECK(stream);
|
| - DCHECK(completed_);
|
| -
|
| +void HttpStreamFactoryImpl::Request::Orphan(Job* job) {
|
| // |job| should only be NULL if we're being serviced by a late bound
|
| // SpdySession or HttpPipelinedConnection (one that was not created by a job
|
| // in our |jobs_| set).
|
| @@ -123,9 +118,46 @@ void HttpStreamFactoryImpl::Request::OnStreamReady(
|
| } else {
|
| DCHECK(jobs_.empty());
|
| }
|
| +}
|
| +
|
| +void HttpStreamFactoryImpl::Request::OnStreamReady(
|
| + Job* job,
|
| + const SSLConfig& used_ssl_config,
|
| + const ProxyInfo& used_proxy_info,
|
| + HttpStreamBase* stream) {
|
| + DCHECK(stream);
|
| + DCHECK(completed_);
|
| +
|
| + Orphan(job);
|
| delegate_->OnStreamReady(used_ssl_config, used_proxy_info, stream);
|
| }
|
|
|
| +void HttpStreamFactoryImpl::Request::OnSocketReady(
|
| + Job* job,
|
| + const SSLConfig& used_ssl_config,
|
| + const ProxyInfo& used_proxy_info,
|
| + ClientSocketHandle* connection) {
|
| + DCHECK(connection);
|
| + DCHECK(completed_);
|
| +
|
| + Orphan(job);
|
| + delegate_->OnSocketReady(used_ssl_config, used_proxy_info, connection);
|
| +}
|
| +
|
| +void HttpStreamFactoryImpl::Request::OnSpdySessionReadyForWS(
|
| + Job* job,
|
| + const SSLConfig& used_ssl_config,
|
| + const ProxyInfo& used_proxy_info,
|
| + scoped_refptr<SpdySession> session) {
|
| + DCHECK(session);
|
| + DCHECK(completed_);
|
| +
|
| + Orphan(job);
|
| + delegate_->OnSpdySessionReady(used_ssl_config,
|
| + used_proxy_info,
|
| + session.get());
|
| +}
|
| +
|
| void HttpStreamFactoryImpl::Request::OnStreamFailed(
|
| Job* job,
|
| int status,
|
| @@ -290,7 +322,7 @@ void HttpStreamFactoryImpl::Request::OnSpdySessionReady(
|
| // The first case is the usual case.
|
| if (!bound_job_.get()) {
|
| OrphanJobsExcept(job);
|
| - } else { // This is the case for HTTPS proxy tunneling.
|
| + } else { // This is the case for HTTPS proxy tunneling.
|
| DCHECK_EQ(bound_job_.get(), job);
|
| DCHECK(jobs_.empty());
|
| }
|
|
|