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

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

Issue 2348453002: Remove NPN from SSLConfig and SSLClientSocket*. (Closed)
Patch Set: Re: #7. Created 4 years, 3 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 | « net/http/http_stream_factory_impl_job.cc ('k') | net/socket/ssl_client_socket.h » ('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/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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (!alpn_protos.empty()) { 440 if (!alpn_protos.empty()) {
441 std::string next_protos_string; 441 std::string next_protos_string;
442 for (NextProto proto : alpn_protos) { 442 for (NextProto proto : alpn_protos) {
443 if (!next_protos_string.empty()) 443 if (!next_protos_string.empty())
444 next_protos_string.append(","); 444 next_protos_string.append(",");
445 next_protos_string.append(SSLClientSocket::NextProtoToString(proto)); 445 next_protos_string.append(SSLClientSocket::NextProtoToString(proto));
446 } 446 }
447 status_dict->SetString("alpn_protos", next_protos_string); 447 status_dict->SetString("alpn_protos", next_protos_string);
448 } 448 }
449 449
450 NextProtoVector npn_protos;
451 http_network_session->GetNpnProtos(&npn_protos);
452 if (!npn_protos.empty()) {
453 std::string next_protos_string;
454 for (NextProto proto : npn_protos) {
455 if (!next_protos_string.empty())
456 next_protos_string.append(",");
457 next_protos_string.append(SSLClientSocket::NextProtoToString(proto));
458 }
459 status_dict->SetString("npn_protos", next_protos_string);
460 }
461
462 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS), 450 net_info_dict->Set(NetInfoSourceToString(NET_INFO_SPDY_STATUS),
463 status_dict); 451 status_dict);
464 } 452 }
465 453
466 if (info_sources & NET_INFO_ALT_SVC_MAPPINGS) { 454 if (info_sources & NET_INFO_ALT_SVC_MAPPINGS) {
467 const HttpServerProperties& http_server_properties = 455 const HttpServerProperties& http_server_properties =
468 *context->http_server_properties(); 456 *context->http_server_properties();
469 net_info_dict->Set( 457 net_info_dict->Set(
470 NetInfoSourceToString(NET_INFO_ALT_SVC_MAPPINGS), 458 NetInfoSourceToString(NET_INFO_ALT_SVC_MAPPINGS),
471 http_server_properties.GetAlternativeServiceInfoAsValue()); 459 http_server_properties.GetAlternativeServiceInfoAsValue());
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 // fine, since GetRequestStateAsValue() ignores the capture mode. 526 // fine, since GetRequestStateAsValue() ignores the capture mode.
539 NetLog::EntryData entry_data( 527 NetLog::EntryData entry_data(
540 NetLogEventType::REQUEST_ALIVE, request->net_log().source(), 528 NetLogEventType::REQUEST_ALIVE, request->net_log().source(),
541 NetLogEventPhase::BEGIN, request->creation_time(), &callback); 529 NetLogEventPhase::BEGIN, request->creation_time(), &callback);
542 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default()); 530 NetLog::Entry entry(&entry_data, NetLogCaptureMode::Default());
543 observer->OnAddEntry(entry); 531 observer->OnAddEntry(entry);
544 } 532 }
545 } 533 }
546 534
547 } // namespace net 535 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/socket/ssl_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698