| 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/base/net_log_util.h" | 5 #include "net/base/net_log_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 const net::HttpServerProperties& http_server_properties = | 414 const net::HttpServerProperties& http_server_properties = |
| 415 *context->http_server_properties(); | 415 *context->http_server_properties(); |
| 416 | 416 |
| 417 const net::AlternateProtocolMap& map = | 417 const net::AlternateProtocolMap& map = |
| 418 http_server_properties.alternate_protocol_map(); | 418 http_server_properties.alternate_protocol_map(); |
| 419 | 419 |
| 420 for (net::AlternateProtocolMap::const_iterator it = map.begin(); | 420 for (net::AlternateProtocolMap::const_iterator it = map.begin(); |
| 421 it != map.end(); ++it) { | 421 it != map.end(); ++it) { |
| 422 base::DictionaryValue* dict = new base::DictionaryValue(); | 422 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 423 dict->SetString("host_port_pair", it->first.ToString()); | 423 dict->SetString("host_port_pair", it->first.ToString()); |
| 424 dict->SetString("alternate_protocol", it->second.ToString()); | 424 dict->SetString("alternate_protocols", |
| 425 AlternateProtocolsToString(it->second)); |
| 425 dict_list->Append(dict); | 426 dict_list->Append(dict); |
| 426 } | 427 } |
| 427 | 428 |
| 428 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_ALT_PROTO_MAPPINGS), | 429 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_ALT_PROTO_MAPPINGS), |
| 429 dict_list); | 430 dict_list); |
| 430 } | 431 } |
| 431 | 432 |
| 432 if (info_sources & NET_INFO_QUIC) { | 433 if (info_sources & NET_INFO_QUIC) { |
| 433 net_info_dict->Set(NetInfoSourceToString(NET_INFO_QUIC), | 434 net_info_dict->Set(NetInfoSourceToString(NET_INFO_QUIC), |
| 434 http_network_session->QuicInfoToValue()); | 435 http_network_session->QuicInfoToValue()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 452 info_dict->Set("stats", stats_dict); | 453 info_dict->Set("stats", stats_dict); |
| 453 | 454 |
| 454 net_info_dict->Set(NetInfoSourceToString(NET_INFO_HTTP_CACHE), | 455 net_info_dict->Set(NetInfoSourceToString(NET_INFO_HTTP_CACHE), |
| 455 info_dict); | 456 info_dict); |
| 456 } | 457 } |
| 457 | 458 |
| 458 return net_info_dict.Pass(); | 459 return net_info_dict.Pass(); |
| 459 } | 460 } |
| 460 | 461 |
| 461 } // namespace net | 462 } // namespace net |
| OLD | NEW |