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 21 matching lines...) Expand all Loading... |
32 #include "net/log/net_log_capture_mode.h" | 32 #include "net/log/net_log_capture_mode.h" |
33 #include "net/log/net_log_entry.h" | 33 #include "net/log/net_log_entry.h" |
34 #include "net/log/net_log_event_type.h" | 34 #include "net/log/net_log_event_type.h" |
35 #include "net/log/net_log_parameters_callback.h" | 35 #include "net/log/net_log_parameters_callback.h" |
36 #include "net/log/net_log_with_source.h" | 36 #include "net/log/net_log_with_source.h" |
37 #include "net/proxy/proxy_config.h" | 37 #include "net/proxy/proxy_config.h" |
38 #include "net/proxy/proxy_retry_info.h" | 38 #include "net/proxy/proxy_retry_info.h" |
39 #include "net/proxy/proxy_service.h" | 39 #include "net/proxy/proxy_service.h" |
40 #include "net/quic/core/quic_protocol.h" | 40 #include "net/quic/core/quic_protocol.h" |
41 #include "net/quic/core/quic_utils.h" | 41 #include "net/quic/core/quic_utils.h" |
42 #include "net/socket/next_proto.h" | 42 #include "net/socket/ssl_client_socket.h" |
43 #include "net/url_request/url_request.h" | 43 #include "net/url_request/url_request.h" |
44 #include "net/url_request/url_request_context.h" | 44 #include "net/url_request/url_request_context.h" |
45 | 45 |
46 namespace net { | 46 namespace net { |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 // This should be incremented when significant changes are made that will | 50 // This should be incremented when significant changes are made that will |
51 // invalidate the old loading code. | 51 // invalidate the old loading code. |
52 const int kLogFormatVersion = 1; | 52 const int kLogFormatVersion = 1; |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 status_dict->SetBoolean("enable_http2", | 439 status_dict->SetBoolean("enable_http2", |
440 http_network_session->params().enable_http2); | 440 http_network_session->params().enable_http2); |
441 | 441 |
442 NextProtoVector alpn_protos; | 442 NextProtoVector alpn_protos; |
443 http_network_session->GetAlpnProtos(&alpn_protos); | 443 http_network_session->GetAlpnProtos(&alpn_protos); |
444 if (!alpn_protos.empty()) { | 444 if (!alpn_protos.empty()) { |
445 std::string next_protos_string; | 445 std::string next_protos_string; |
446 for (NextProto proto : alpn_protos) { | 446 for (NextProto proto : alpn_protos) { |
447 if (!next_protos_string.empty()) | 447 if (!next_protos_string.empty()) |
448 next_protos_string.append(","); | 448 next_protos_string.append(","); |
449 next_protos_string.append(NextProtoToString(proto)); | 449 next_protos_string.append(SSLClientSocket::NextProtoToString(proto)); |
450 } | 450 } |
451 status_dict->SetString("alpn_protos", next_protos_string); | 451 status_dict->SetString("alpn_protos", next_protos_string); |
452 } | 452 } |
453 | 453 |
454 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS), | 454 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS), |
455 status_dict); | 455 status_dict); |
456 } | 456 } |
457 | 457 |
458 if (info_sources & NET_INFO_ALT_SVC_MAPPINGS) { | 458 if (info_sources & NET_INFO_ALT_SVC_MAPPINGS) { |
459 const HttpServerProperties& http_server_properties = | 459 const HttpServerProperties& http_server_properties = |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // fine, since GetRequestStateAsValue() ignores the capture mode. | 530 // fine, since GetRequestStateAsValue() ignores the capture mode. |
531 NetLogEntryData entry_data( | 531 NetLogEntryData entry_data( |
532 NetLogEventType::REQUEST_ALIVE, request->net_log().source(), | 532 NetLogEventType::REQUEST_ALIVE, request->net_log().source(), |
533 NetLogEventPhase::BEGIN, request->creation_time(), &callback); | 533 NetLogEventPhase::BEGIN, request->creation_time(), &callback); |
534 NetLogEntry entry(&entry_data, NetLogCaptureMode::Default()); | 534 NetLogEntry entry(&entry_data, NetLogCaptureMode::Default()); |
535 observer->OnAddEntry(entry); | 535 observer->OnAddEntry(entry); |
536 } | 536 } |
537 } | 537 } |
538 | 538 |
539 } // namespace net | 539 } // namespace net |
OLD | NEW |