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

Side by Side Diff: net/base/net_log_util.cc

Issue 1043973002: Introduce AlternativeServiceInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Early return. Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS), 463 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS),
464 status_dict); 464 status_dict);
465 } 465 }
466 466
467 if (info_sources & NET_INFO_SPDY_ALT_PROTO_MAPPINGS) { 467 if (info_sources & NET_INFO_SPDY_ALT_PROTO_MAPPINGS) {
468 base::ListValue* dict_list = new base::ListValue(); 468 base::ListValue* dict_list = new base::ListValue();
469 469
470 const net::HttpServerProperties& http_server_properties = 470 const net::HttpServerProperties& http_server_properties =
471 *context->http_server_properties(); 471 *context->http_server_properties();
472 472
473 const net::AlternateProtocolMap& map = 473 const net::AlternativeServiceMap& map =
474 http_server_properties.alternate_protocol_map(); 474 http_server_properties.alternative_service_map();
475 475
476 for (net::AlternateProtocolMap::const_iterator it = map.begin(); 476 for (net::AlternativeServiceMap::const_iterator it = map.begin();
477 it != map.end(); ++it) { 477 it != map.end(); ++it) {
478 base::DictionaryValue* dict = new base::DictionaryValue(); 478 base::DictionaryValue* dict = new base::DictionaryValue();
479 dict->SetString("host_port_pair", it->first.ToString()); 479 dict->SetString("host_port_pair", it->first.ToString());
480 dict->SetString("alternate_protocol", it->second.ToString()); 480 dict->SetString("alternative_service", it->second.ToString());
481 dict_list->Append(dict); 481 dict_list->Append(dict);
482 } 482 }
483 483
484 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_ALT_PROTO_MAPPINGS), 484 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_ALT_PROTO_MAPPINGS),
485 dict_list); 485 dict_list);
486 } 486 }
487 487
488 if (info_sources & NET_INFO_QUIC) { 488 if (info_sources & NET_INFO_QUIC) {
489 net_info_dict->Set(NetInfoSourceToString(NET_INFO_QUIC), 489 net_info_dict->Set(NetInfoSourceToString(NET_INFO_QUIC),
490 http_network_session->QuicInfoToValue()); 490 http_network_session->QuicInfoToValue());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 request->net_log().source(), 556 request->net_log().source(),
557 net::NetLog::PHASE_BEGIN, 557 net::NetLog::PHASE_BEGIN,
558 request->creation_time(), 558 request->creation_time(),
559 &callback); 559 &callback);
560 NetLog::Entry entry(&entry_data, request->net_log().GetLogLevel()); 560 NetLog::Entry entry(&entry_data, request->net_log().GetLogLevel());
561 observer->OnAddEntry(entry); 561 observer->OnAddEntry(entry);
562 } 562 }
563 } 563 }
564 564
565 } // namespace net 565 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698