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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1550843002: Convert enable_bidirectional_stream into build flag local to net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 4 years, 11 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_job.h ('k') | net/http/http_stream_factory_impl_request.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_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index f66b0532f9cc017cfcc75f8f73eebadffe2a0a92..791a390dac5d8e5615822994b35f3e9cb3cd0cf6 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -51,7 +51,7 @@
#include "net/ssl/ssl_connection_status_flags.h"
#include "net/ssl/ssl_failure_state.h"
-#if defined(ENABLE_BIDIRECTIONAL_STREAM)
+#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
#include "net/http/bidirectional_stream_job.h"
#include "net/spdy/bidirectional_stream_spdy_job.h"
#endif
@@ -375,7 +375,7 @@ void HttpStreamFactoryImpl::Job::OnWebSocketHandshakeStreamReadyCallback() {
}
void HttpStreamFactoryImpl::Job::OnBidirectionalStreamJobReadyCallback() {
-#if defined(ENABLE_BIDIRECTIONAL_STREAM)
+#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
DCHECK(bidirectional_stream_job_);
MaybeCopyConnectionAttemptsFromSocketOrHandle();
@@ -396,7 +396,7 @@ void HttpStreamFactoryImpl::Job::OnBidirectionalStreamJobReadyCallback() {
}
void HttpStreamFactoryImpl::Job::OnNewSpdySessionReadyCallback() {
-#if defined(ENABLE_BIDIRECTIONAL_STREAM)
+#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
DCHECK(stream_.get() || bidirectional_stream_job_.get());
#else
DCHECK(stream_.get());
@@ -421,7 +421,7 @@ void HttpStreamFactoryImpl::Job::OnNewSpdySessionReadyCallback() {
stream_factory_->OnOrphanedJobComplete(this);
} else {
if (for_bidirectional_) {
-#if defined(ENABLE_BIDIRECTIONAL_STREAM)
+#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
DCHECK(bidirectional_stream_job_);
request_->OnNewSpdySessionReady(this, /*spdy_http_stream=*/nullptr,
std::move(bidirectional_stream_job_),
@@ -623,7 +623,7 @@ int HttpStreamFactoryImpl::Job::RunLoop(int result) {
FROM_HERE, base::Bind(&Job::OnWebSocketHandshakeStreamReadyCallback,
ptr_factory_.GetWeakPtr()));
} else if (for_bidirectional_) {
-#if defined(ENABLE_BIDIRECTIONAL_STREAM)
+#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
if (!bidirectional_stream_job_) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&Job::OnStreamFailedCallback,
@@ -1214,7 +1214,7 @@ int HttpStreamFactoryImpl::Job::SetSpdyHttpStreamOrBidirectionalStreamJob(
if (stream_factory_->for_websockets_)
return ERR_NOT_IMPLEMENTED;
if (for_bidirectional_) {
-#if defined(ENABLE_BIDIRECTIONAL_STREAM)
+#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
// TODO(xunjieli): Create QUIC's version of BidirectionalStreamJob.
bidirectional_stream_job_.reset(new BidirectionalStreamSpdyJob(session));
return OK;
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698