| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 424 } |
| 425 | 425 |
| 426 if (info_sources & NET_INFO_SPDY_SESSIONS) { | 426 if (info_sources & NET_INFO_SPDY_SESSIONS) { |
| 427 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_SESSIONS), | 427 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_SESSIONS), |
| 428 http_network_session->SpdySessionPoolInfoToValue()); | 428 http_network_session->SpdySessionPoolInfoToValue()); |
| 429 } | 429 } |
| 430 | 430 |
| 431 if (info_sources & NET_INFO_SPDY_STATUS) { | 431 if (info_sources & NET_INFO_SPDY_STATUS) { |
| 432 base::DictionaryValue* status_dict = new base::DictionaryValue(); | 432 base::DictionaryValue* status_dict = new base::DictionaryValue(); |
| 433 | 433 |
| 434 status_dict->SetBoolean("enable_spdy31", | |
| 435 http_network_session->params().enable_spdy31 && | |
| 436 HttpStreamFactory::spdy_enabled()); | |
| 437 status_dict->SetBoolean("enable_http2", | 434 status_dict->SetBoolean("enable_http2", |
| 438 http_network_session->params().enable_http2 && | 435 http_network_session->params().enable_http2); |
| 439 HttpStreamFactory::spdy_enabled()); | |
| 440 | 436 |
| 441 NextProtoVector alpn_protos; | 437 NextProtoVector alpn_protos; |
| 442 http_network_session->GetAlpnProtos(&alpn_protos); | 438 http_network_session->GetAlpnProtos(&alpn_protos); |
| 443 if (!alpn_protos.empty()) { | 439 if (!alpn_protos.empty()) { |
| 444 std::string next_protos_string; | 440 std::string next_protos_string; |
| 445 for (NextProto proto : alpn_protos) { | 441 for (NextProto proto : alpn_protos) { |
| 446 if (!next_protos_string.empty()) | 442 if (!next_protos_string.empty()) |
| 447 next_protos_string.append(","); | 443 next_protos_string.append(","); |
| 448 next_protos_string.append(SSLClientSocket::NextProtoToString(proto)); | 444 next_protos_string.append(SSLClientSocket::NextProtoToString(proto)); |
| 449 } | 445 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 // fine, since GetRequestStateAsValue() ignores the capture mode. | 537 // fine, since GetRequestStateAsValue() ignores the capture mode. |
| 542 NetLog::EntryData entry_data( | 538 NetLog::EntryData entry_data( |
| 543 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(), | 539 NetLog::TYPE_REQUEST_ALIVE, request->net_log().source(), |
| 544 NetLog::PHASE_BEGIN, request->creation_time(), &callback); | 540 NetLog::PHASE_BEGIN, request->creation_time(), &callback); |
| 545 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); | 541 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); |
| 546 observer->OnAddEntry(entry); | 542 observer->OnAddEntry(entry); |
| 547 } | 543 } |
| 548 } | 544 } |
| 549 | 545 |
| 550 } // namespace net | 546 } // namespace net |
| OLD | NEW |