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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 1793273004: Revert of Implement QUIC-based net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basecl
Patch Set: 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 28fa8aa57c29814275666e1824debdb88f3a32ff..06a5c0b6835797b9ee082764a10615d2e1e1b469 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -54,9 +54,13 @@
HttpStreamRequest::Delegate* delegate,
const BoundNetLog& net_log) {
DCHECK(!for_websockets_);
- return RequestStreamInternal(request_info, priority, server_ssl_config,
- proxy_ssl_config, delegate, nullptr,
- HttpStreamRequest::HTTP_STREAM, net_log);
+ return RequestStreamInternal(request_info,
+ priority,
+ server_ssl_config,
+ proxy_ssl_config,
+ delegate,
+ NULL,
+ net_log);
}
HttpStreamRequest* HttpStreamFactoryImpl::RequestWebSocketHandshakeStream(
@@ -69,9 +73,13 @@
const BoundNetLog& net_log) {
DCHECK(for_websockets_);
DCHECK(create_helper);
- return RequestStreamInternal(request_info, priority, server_ssl_config,
- proxy_ssl_config, delegate, create_helper,
- HttpStreamRequest::HTTP_STREAM, net_log);
+ return RequestStreamInternal(request_info,
+ priority,
+ server_ssl_config,
+ proxy_ssl_config,
+ delegate,
+ create_helper,
+ net_log);
}
HttpStreamRequest* HttpStreamFactoryImpl::RequestBidirectionalStreamJob(
@@ -84,9 +92,24 @@
DCHECK(!for_websockets_);
DCHECK(request_info.url.SchemeIs(url::kHttpsScheme));
- return RequestStreamInternal(
- request_info, priority, server_ssl_config, proxy_ssl_config, delegate,
- nullptr, HttpStreamRequest::BIDIRECTIONAL_STREAM, net_log);
+// 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
}
HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
@@ -97,11 +120,10 @@
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, stream_type);
+ net_log, Request::HTTP_STREAM);
HostPortPair server = HostPortPair::FromURL(request_info.url);
GURL origin_url = ApplyHostMappingRules(request_info.url, &server);
@@ -316,8 +338,7 @@
// TODO(ricea): Restore this code path when WebSocket over SPDY
// implementation is ready.
NOTREACHED();
- } else if (request->stream_type() ==
- HttpStreamRequest::BIDIRECTIONAL_STREAM) {
+ } else if (request->for_bidirectional()) {
#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