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

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

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
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 15 matching lines...) Expand all
26 #include "net/dns/host_resolver.h" 26 #include "net/dns/host_resolver.h"
27 #include "net/http/http_cache.h" 27 #include "net/http/http_cache.h"
28 #include "net/http/http_network_session.h" 28 #include "net/http/http_network_session.h"
29 #include "net/http/http_server_properties.h" 29 #include "net/http/http_server_properties.h"
30 #include "net/http/http_transaction_factory.h" 30 #include "net/http/http_transaction_factory.h"
31 #include "net/proxy/proxy_config.h" 31 #include "net/proxy/proxy_config.h"
32 #include "net/proxy/proxy_retry_info.h" 32 #include "net/proxy/proxy_retry_info.h"
33 #include "net/proxy/proxy_service.h" 33 #include "net/proxy/proxy_service.h"
34 #include "net/quic/quic_protocol.h" 34 #include "net/quic/quic_protocol.h"
35 #include "net/quic/quic_utils.h" 35 #include "net/quic/quic_utils.h"
36 #include "net/socket/ssl_client_socket.h"
36 #include "net/url_request/url_request.h" 37 #include "net/url_request/url_request.h"
37 #include "net/url_request/url_request_context.h" 38 #include "net/url_request/url_request_context.h"
38 39
39 namespace net { 40 namespace net {
40 41
41 namespace { 42 namespace {
42 43
43 // This should be incremented when significant changes are made that will 44 // This should be incremented when significant changes are made that will
44 // invalidate the old loading code. 45 // invalidate the old loading code.
45 const int kLogFormatVersion = 1; 46 const int kLogFormatVersion = 1;
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 status_dict->SetBoolean( 441 status_dict->SetBoolean(
441 "use_alternate_protocols", 442 "use_alternate_protocols",
442 http_network_session->params().use_alternate_protocols); 443 http_network_session->params().use_alternate_protocols);
443 status_dict->SetBoolean( 444 status_dict->SetBoolean(
444 "force_spdy_over_ssl", 445 "force_spdy_over_ssl",
445 http_network_session->params().force_spdy_over_ssl); 446 http_network_session->params().force_spdy_over_ssl);
446 status_dict->SetBoolean( 447 status_dict->SetBoolean(
447 "force_spdy_always", 448 "force_spdy_always",
448 http_network_session->params().force_spdy_always); 449 http_network_session->params().force_spdy_always);
449 450
450 std::vector<std::string> next_protos; 451 NextProtoVector next_protos;
451 http_network_session->GetNextProtos(&next_protos); 452 http_network_session->GetNextProtos(&next_protos);
452 std::string next_protos_string = JoinString(next_protos, ','); 453 if (!next_protos.empty()) {
453 status_dict->SetString("next_protos", next_protos_string); 454 std::string next_protos_string;
455 for (const NextProto proto : next_protos) {
456 if (!next_protos_string.empty())
457 next_protos_string.append(",");
458 next_protos_string.append(SSLClientSocket::NextProtoToString(proto));
459 }
460 status_dict->SetString("next_protos", next_protos_string);
461 }
454 462
455 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS), 463 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS),
456 status_dict); 464 status_dict);
457 } 465 }
458 466
459 if (info_sources & NET_INFO_SPDY_ALT_PROTO_MAPPINGS) { 467 if (info_sources & NET_INFO_SPDY_ALT_PROTO_MAPPINGS) {
460 base::ListValue* dict_list = new base::ListValue(); 468 base::ListValue* dict_list = new base::ListValue();
461 469
462 const net::HttpServerProperties& http_server_properties = 470 const net::HttpServerProperties& http_server_properties =
463 *context->http_server_properties(); 471 *context->http_server_properties();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 request->net_log().source(), 556 request->net_log().source(),
549 net::NetLog::PHASE_BEGIN, 557 net::NetLog::PHASE_BEGIN,
550 request->creation_time(), 558 request->creation_time(),
551 &callback); 559 &callback);
552 NetLog::Entry entry(&entry_data, request->net_log().GetLogLevel()); 560 NetLog::Entry entry(&entry_data, request->net_log().GetLogLevel());
553 observer->OnAddEntry(entry); 561 observer->OnAddEntry(entry);
554 } 562 }
555 } 563 }
556 564
557 } // namespace net 565 } // namespace net
OLDNEW
« no previous file with comments | « net/base/filename_util_unittest.cc ('k') | net/data/proxy_resolver_v8_unittest/pac_library_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698