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

Unified Diff: net/log/net_log_util.cc

Issue 1387363004: Disable HTTP/2 over NPN (with OpenSSL). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable NPN in NSS if npn_protos.empty(). Created 5 years, 2 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/log/net_log_util.cc
diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc
index 46282f7df0ba53f535a3530c125a2dbcd9e399f1..2a223e98c4355b95158dcd905a1a1b857c12a081 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -420,16 +420,28 @@ NET_EXPORT scoped_ptr<base::DictionaryValue> GetNetInfo(
"use_alternative_services",
http_network_session->params().use_alternative_services);
- NextProtoVector next_protos;
- http_network_session->GetNextProtos(&next_protos);
- if (!next_protos.empty()) {
+ NextProtoVector alpn_protos;
+ http_network_session->GetAlpnProtos(&alpn_protos);
+ if (!alpn_protos.empty()) {
std::string next_protos_string;
- for (const NextProto proto : next_protos) {
+ for (const NextProto proto : alpn_protos) {
davidben 2015/10/13 20:55:59 Either const NextProto& proto or NextProto. Since
Bence 2015/10/14 14:55:59 Done.
if (!next_protos_string.empty())
next_protos_string.append(",");
next_protos_string.append(SSLClientSocket::NextProtoToString(proto));
}
- status_dict->SetString("next_protos", next_protos_string);
+ status_dict->SetString("alpn_protos", next_protos_string);
+ }
+
+ NextProtoVector npn_protos;
+ http_network_session->GetNpnProtos(&npn_protos);
+ if (!npn_protos.empty()) {
+ std::string next_protos_string;
+ for (const NextProto proto : npn_protos) {
davidben 2015/10/13 20:55:59 Ditto.
Bence 2015/10/14 14:55:59 Done.
+ if (!next_protos_string.empty())
+ next_protos_string.append(",");
+ next_protos_string.append(SSLClientSocket::NextProtoToString(proto));
+ }
+ status_dict->SetString("npn_protos", next_protos_string);
}
net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS),

Powered by Google App Engine
This is Rietveld 408576698