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

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: Remove #include net_features.h from public headers. Created 5 years 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_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index d5bcc51bbb1a72b8f8c99d414427f3b8ea9fdd85..709f03acb86c2186b9f5bfc9967e7b8c1219dc9c 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
@@ -368,7 +368,7 @@ void HttpStreamFactoryImpl::Job::OnWebSocketHandshakeStreamReadyCallback() {
}
void HttpStreamFactoryImpl::Job::OnBidirectionalStreamJobReadyCallback() {
-#if defined(ENABLE_BIDIRECTIONAL_STREAM)
+#if BUILDFLAG(ENABLE_BIDIRECTIONAL_STREAM)
DCHECK(bidirectional_stream_job_);
MaybeCopyConnectionAttemptsFromSocketOrHandle();
@@ -389,7 +389,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());
@@ -414,7 +414,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_),
@@ -616,7 +616,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;

Powered by Google App Engine
This is Rietveld 408576698