| Index: net/http/http_stream_factory_impl.cc
|
| diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
|
| index 2a8664e51a6458ed9d087582066a943a03552c27..c99c1452acdc20832cc0e1cdf5bde1e3eb549c77 100644
|
| --- a/net/http/http_stream_factory_impl.cc
|
| +++ b/net/http/http_stream_factory_impl.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
| #include "net/base/net_util.h"
|
| +#include "net/http/bidirectional_stream.h"
|
| #include "net/http/http_network_session.h"
|
| #include "net/http/http_server_properties.h"
|
| #include "net/http/http_stream_factory_impl_job.h"
|
| @@ -75,6 +76,24 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestWebSocketHandshakeStream(
|
| net_log);
|
| }
|
|
|
| +HttpStreamRequest* HttpStreamFactoryImpl::RequestBidirectionalStream(
|
| + const HttpRequestInfo& request_info,
|
| + RequestPriority priority,
|
| + const SSLConfig& server_ssl_config,
|
| + const SSLConfig& proxy_ssl_config,
|
| + HttpStreamRequest::Delegate* delegate,
|
| + const BoundNetLog& net_log) {
|
| + DCHECK(!for_websockets_);
|
| + Request* request =
|
| + new Request(request_info.url, this, delegate, nullptr, net_log, true);
|
| + Job* job = new Job(this, session_, request_info, priority, server_ssl_config,
|
| + proxy_ssl_config, net_log.net_log());
|
| + request->AttachJob(job);
|
| +
|
| + job->Start(request);
|
| + return request;
|
| +}
|
| +
|
| HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
|
| const HttpRequestInfo& request_info,
|
| RequestPriority priority,
|
| @@ -260,12 +279,14 @@ void HttpStreamFactoryImpl::OnNewSpdySessionReady(
|
| // TODO(ricea): Restore this code path when WebSocket over SPDY
|
| // implementation is ready.
|
| NOTREACHED();
|
| + } else if (request->for_bidirectional()) {
|
| + request->OnBidirectionalStreamReady(
|
| + nullptr, used_ssl_config, used_proxy_info,
|
| + new BidirectionalStream(spdy_session));
|
| } else {
|
| bool use_relative_url = direct || request->url().SchemeIs("https");
|
| request->OnStreamReady(
|
| - NULL,
|
| - used_ssl_config,
|
| - used_proxy_info,
|
| + nullptr, used_ssl_config, used_proxy_info,
|
| new SpdyHttpStream(spdy_session, use_relative_url));
|
| }
|
| }
|
|
|