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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 1744693002: Implement QUIC-based net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basecl
Patch Set: Fix compile due to merge Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 06a5c0b6835797b9ee082764a10615d2e1e1b469..28fa8aa57c29814275666e1824debdb88f3a32ff 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -54,13 +54,9 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStream(
HttpStreamRequest::Delegate* delegate,
const BoundNetLog& net_log) {
DCHECK(!for_websockets_);
- return RequestStreamInternal(request_info,
- priority,
- server_ssl_config,
- proxy_ssl_config,
- delegate,
- NULL,
- net_log);
+ return RequestStreamInternal(request_info, priority, server_ssl_config,
+ proxy_ssl_config, delegate, nullptr,
+ HttpStreamRequest::HTTP_STREAM, net_log);
}
HttpStreamRequest* HttpStreamFactoryImpl::RequestWebSocketHandshakeStream(
@@ -73,13 +69,9 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestWebSocketHandshakeStream(
const BoundNetLog& net_log) {
DCHECK(for_websockets_);
DCHECK(create_helper);
- return RequestStreamInternal(request_info,
- priority,
- server_ssl_config,
- proxy_ssl_config,
- delegate,
- create_helper,
- net_log);
+ return RequestStreamInternal(request_info, priority, server_ssl_config,
+ proxy_ssl_config, delegate, create_helper,
+ HttpStreamRequest::HTTP_STREAM, net_log);
}
HttpStreamRequest* HttpStreamFactoryImpl::RequestBidirectionalStreamJob(
@@ -92,24 +84,9 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestBidirectionalStreamJob(
DCHECK(!for_websockets_);
DCHECK(request_info.url.SchemeIs(url::kHttpsScheme));
-// TODO(xunjieli): Create QUIC's version of BidirectionalStreamJob.
-#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
- HostPortPair server = HostPortPair::FromURL(request_info.url);
- GURL origin_url = ApplyHostMappingRules(request_info.url, &server);
- Request* request =
- new Request(request_info.url, this, delegate, nullptr, net_log,
- Request::BIDIRECTIONAL_STREAM_SPDY_JOB);
- Job* job = new Job(this, session_, request_info, priority, server_ssl_config,
- proxy_ssl_config, server, origin_url, net_log.net_log());
- request->AttachJob(job);
-
- job->Start(request);
- return request;
-
-#else
- DCHECK(false);
- return nullptr;
-#endif
+ return RequestStreamInternal(
+ request_info, priority, server_ssl_config, proxy_ssl_config, delegate,
+ nullptr, HttpStreamRequest::BIDIRECTIONAL_STREAM, net_log);
}
HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
@@ -120,10 +97,11 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
+ HttpStreamRequest::StreamType stream_type,
const BoundNetLog& net_log) {
Request* request = new Request(request_info.url, this, delegate,
websocket_handshake_stream_create_helper,
- net_log, Request::HTTP_STREAM);
+ net_log, stream_type);
HostPortPair server = HostPortPair::FromURL(request_info.url);
GURL origin_url = ApplyHostMappingRules(request_info.url, &server);
@@ -338,7 +316,8 @@ void HttpStreamFactoryImpl::OnNewSpdySessionReady(
// TODO(ricea): Restore this code path when WebSocket over SPDY
// implementation is ready.
NOTREACHED();
- } else if (request->for_bidirectional()) {
+ } else if (request->stream_type() ==
+ HttpStreamRequest::BIDIRECTIONAL_STREAM) {
#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
request->OnBidirectionalStreamJobReady(
nullptr, used_ssl_config, used_proxy_info,
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698