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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 2373663002: Unify enum NextProto and enum AlternateProtocol. (Closed)
Patch Set: Fix compile errors. Created 4 years, 1 month 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_job_controller.cc » ('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 c04cb47e82a5e57476f83dcdee7fd914a19c3fc1..e91febf82cd8ef047ba7bbd1bdd79ecd74c7214e 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -140,8 +140,7 @@ std::unique_ptr<base::Value> NetLogHttpStreamProtoCallback(
NetLogCaptureMode /* capture_mode */) {
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
- dict->SetString("proto",
- SSLClientSocket::NextProtoToString(negotiated_protocol));
+ dict->SetString("proto", NextProtoToString(negotiated_protocol));
return std::move(dict);
}
@@ -214,14 +213,14 @@ HttpStreamFactoryImpl::Job::Job(Delegate* delegate,
// the same time since alternative services are used for requests that are
// fetched directly, while the alternative proxy server is used for requests
// that should be fetched using proxy.
- DCHECK(alternative_service_.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL ||
+ DCHECK(alternative_service_.protocol == kProtoUnknown ||
!alternative_proxy_server_.is_valid());
DCHECK(!alternative_proxy_server_.is_valid() ||
!(IsSpdyAlternative() || IsQuicAlternative()));
// If either the alternative service protocol is specified or if the
// alternative proxy server is valid, then the job type must be set to
// either ALTERNATIVE or PRECONNECT.
- DCHECK((alternative_service_.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL &&
+ DCHECK((alternative_service_.protocol == kProtoUnknown &&
!alternative_proxy_server_.is_valid()) ||
(job_type_ == ALTERNATIVE || job_type_ == PRECONNECT));
// If the alternative proxy server is valid, then the job type must be
@@ -1312,11 +1311,11 @@ bool HttpStreamFactoryImpl::Job::IsHttpsProxyAndHttpUrl() const {
}
bool HttpStreamFactoryImpl::Job::IsSpdyAlternative() const {
- return alternative_service_.protocol == NPN_HTTP_2;
+ return alternative_service_.protocol == kProtoHTTP2;
}
bool HttpStreamFactoryImpl::Job::IsQuicAlternative() const {
- return alternative_service_.protocol == QUIC;
+ return alternative_service_.protocol == kProtoQUIC;
}
void HttpStreamFactoryImpl::Job::InitSSLConfig(SSLConfig* ssl_config,
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_job_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698