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

Unified Diff: net/http/http_stream_factory_impl_request.cc

Issue 1744693002: Implement QUIC-based net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basecl
Patch Set: Address comments and fixed tests 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
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 59b7b44c4acc5143885ca09a978a73b1eba021da..a335a55dcdbc2f54276595373bbed8e8e942128a 100644
--- a/net/http/http_stream_factory_impl_request.cc
+++ b/net/http/http_stream_factory_impl_request.cc
@@ -35,7 +35,7 @@ HttpStreamFactoryImpl::Request::Request(
was_npn_negotiated_(false),
protocol_negotiated_(kProtoUnknown),
using_spdy_(false),
- for_bidirectional_(stream_type == BIDIRECTIONAL_STREAM_SPDY_JOB) {
+ stream_type_(stream_type) {
DCHECK(factory_);
DCHECK(delegate_);
@@ -83,7 +83,7 @@ void HttpStreamFactoryImpl::Request::OnStreamReady(
const ProxyInfo& used_proxy_info,
HttpStream* stream) {
DCHECK(!factory_->for_websockets_);
- DCHECK(!for_bidirectional_);
+ DCHECK_EQ(HttpStreamRequest::HTTP_STREAM, stream_type_);
DCHECK(stream);
DCHECK(completed_);
@@ -97,7 +97,7 @@ void HttpStreamFactoryImpl::Request::OnBidirectionalStreamJobReady(
const ProxyInfo& used_proxy_info,
BidirectionalStreamJob* stream_job) {
DCHECK(!factory_->for_websockets_);
- DCHECK(for_bidirectional_);
+ DCHECK_EQ(HttpStreamRequest::BIDIRECTIONAL_STREAM, stream_type_);
DCHECK(stream_job);
DCHECK(completed_);
@@ -112,7 +112,7 @@ void HttpStreamFactoryImpl::Request::OnWebSocketHandshakeStreamReady(
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) {
DCHECK(factory_->for_websockets_);
- DCHECK(!for_bidirectional_);
+ DCHECK_EQ(HttpStreamRequest::HTTP_STREAM, stream_type_);
DCHECK(stream);
DCHECK(completed_);
@@ -314,7 +314,7 @@ void HttpStreamFactoryImpl::Request::OnNewSpdySessionReady(
// TODO(ricea): Re-instate this code when WebSockets over SPDY is
// implemented.
NOTREACHED();
- } else if (for_bidirectional_) {
+ } else if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
DCHECK(bidirectional_stream_job);
DCHECK(!stream);
#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)

Powered by Google App Engine
This is Rietveld 408576698