OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/log/net_log_util.h" | 5 #include "net/log/net_log_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 if (!alpn_protos.empty()) { | 440 if (!alpn_protos.empty()) { |
441 std::string next_protos_string; | 441 std::string next_protos_string; |
442 for (NextProto proto : alpn_protos) { | 442 for (NextProto proto : alpn_protos) { |
443 if (!next_protos_string.empty()) | 443 if (!next_protos_string.empty()) |
444 next_protos_string.append(","); | 444 next_protos_string.append(","); |
445 next_protos_string.append(SSLClientSocket::NextProtoToString(proto)); | 445 next_protos_string.append(SSLClientSocket::NextProtoToString(proto)); |
446 } | 446 } |
447 status_dict->SetString("alpn_protos", next_protos_string); | 447 status_dict->SetString("alpn_protos", next_protos_string); |
448 } | 448 } |
449 | 449 |
450 NextProtoVector npn_protos; | |
451 http_network_session->GetNpnProtos(&npn_protos); | |
452 if (!npn_protos.empty()) { | |
453 std::string next_protos_string; | |
454 for (NextProto proto : npn_protos) { | |
455 if (!next_protos_string.empty()) | |
456 next_protos_string.append(","); | |
457 next_protos_string.append(SSLClientSocket::NextProtoToString(proto)); | |
458 } | |
459 status_dict->SetString("npn_protos", next_protos_string); | |
460 } | |
461 | |
462 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS), | 450 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS), |
463 status_dict); | 451 status_dict); |
464 } | 452 } |
465 | 453 |
466 if (info_sources & NET_INFO_ALT_SVC_MAPPINGS) { | 454 if (info_sources & NET_INFO_ALT_SVC_MAPPINGS) { |
467 const HttpServerProperties& http_server_properties = | 455 const HttpServerProperties& http_server_properties = |
468 *context->http_server_properties(); | 456 *context->http_server_properties(); |
469 net_info_dict->Set( | 457 net_info_dict->Set( |
470 NetInfoSourceToString(NET_INFO_ALT_SVC_MAPPINGS), | 458 NetInfoSourceToString(NET_INFO_ALT_SVC_MAPPINGS), |
471 http_server_properties.GetAlternativeServiceInfoAsValue()); | 459 http_server_properties.GetAlternativeServiceInfoAsValue()); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 // fine, since GetRequestStateAsValue() ignores the capture mode. | 526 // fine, since GetRequestStateAsValue() ignores the capture mode. |
539 NetLog::EntryData entry_data( | 527 NetLog::EntryData entry_data( |
540 NetLogEventType::REQUEST_ALIVE, request->net_log().source(), | 528 NetLogEventType::REQUEST_ALIVE, request->net_log().source(), |
541 NetLogEventPhase::BEGIN, request->creation_time(), &callback); | 529 NetLogEventPhase::BEGIN, request->creation_time(), &callback); |
542 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); | 530 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); |
543 observer->OnAddEntry(entry); | 531 observer->OnAddEntry(entry); |
544 } | 532 } |
545 } | 533 } |
546 | 534 |
547 } // namespace net | 535 } // namespace net |
OLD | NEW |