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

Unified Diff: net/base/net_log_util.cc

Issue 794563003: Change next_proto member type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix type in callback. Created 6 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
« no previous file with comments | « no previous file | net/http/http_network_session.h » ('j') | net/http/http_network_session.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_log_util.cc
diff --git a/net/base/net_log_util.cc b/net/base/net_log_util.cc
index 3b437aadbda6a0952f120a9b3ab5fc927a638213..3484a9f1ccc23dc878328220c9117ff087f8b234 100644
--- a/net/base/net_log_util.cc
+++ b/net/base/net_log_util.cc
@@ -33,6 +33,7 @@
#include "net/proxy/proxy_service.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_utils.h"
+#include "net/socket/ssl_client_socket.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
@@ -447,10 +448,18 @@ NET_EXPORT scoped_ptr<base::DictionaryValue> GetNetInfo(
"force_spdy_always",
http_network_session->params().force_spdy_always);
- std::vector<std::string> next_protos;
+ NextProtoVector next_protos;
http_network_session->GetNextProtos(&next_protos);
- std::string next_protos_string = JoinString(next_protos, ',');
- status_dict->SetString("next_protos", next_protos_string);
+ if (!next_protos.empty()) {
+ NextProtoVector::iterator it = next_protos.begin();
+ std::string next_protos_string(SSLClientSocket::NextProtoToString(*it));
+ ++it;
+ for (; it != next_protos.end(); ++it) {
+ next_protos_string.append(",");
+ next_protos_string.append(SSLClientSocket::NextProtoToString(*it));
+ }
Ryan Hamilton 2014/12/10 20:08:59 How about: std::string next_protos_string; for (c
Bence 2014/12/10 22:01:23 Done.
+ status_dict->SetString("next_protos", next_protos_string);
Ryan Hamilton 2014/12/10 20:09:00 Alternatively, you could consider using a ListValu
+ }
net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS),
status_dict);
« no previous file with comments | « no previous file | net/http/http_network_session.h » ('j') | net/http/http_network_session.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698