| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/quic/chromium/quic_chromium_client_session.h" | 5 #include "net/quic/chromium/quic_chromium_client_session.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 ++num_total_streams_; | 554 ++num_total_streams_; |
| 555 UMA_HISTOGRAM_COUNTS("Net.QuicSession.NumOpenStreams", | 555 UMA_HISTOGRAM_COUNTS("Net.QuicSession.NumOpenStreams", |
| 556 GetNumOpenOutgoingStreams()); | 556 GetNumOpenOutgoingStreams()); |
| 557 // The previous histogram puts 100 in a bucket betweeen 86-113 which does | 557 // The previous histogram puts 100 in a bucket betweeen 86-113 which does |
| 558 // not shed light on if chrome ever things it has more than 100 streams open. | 558 // not shed light on if chrome ever things it has more than 100 streams open. |
| 559 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.TooManyOpenStreams", | 559 UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.TooManyOpenStreams", |
| 560 GetNumOpenOutgoingStreams() > 100); | 560 GetNumOpenOutgoingStreams() > 100); |
| 561 return stream; | 561 return stream; |
| 562 } | 562 } |
| 563 | 563 |
| 564 QuicCryptoClientStream* QuicChromiumClientSession::GetCryptoStream() { | 564 QuicCryptoClientStream* QuicChromiumClientSession::GetMutableCryptoStream() { |
| 565 return crypto_stream_.get(); | 565 return crypto_stream_.get(); |
| 566 } | 566 } |
| 567 | 567 |
| 568 const QuicCryptoClientStream* QuicChromiumClientSession::GetCryptoStream() |
| 569 const { |
| 570 return crypto_stream_.get(); |
| 571 } |
| 572 |
| 568 bool QuicChromiumClientSession::GetRemoteEndpoint(IPEndPoint* endpoint) { | 573 bool QuicChromiumClientSession::GetRemoteEndpoint(IPEndPoint* endpoint) { |
| 569 *endpoint = peer_address().impl().socket_address(); | 574 *endpoint = peer_address().impl().socket_address(); |
| 570 return true; | 575 return true; |
| 571 } | 576 } |
| 572 | 577 |
| 573 // TODO(rtenneti): Add unittests for GetSSLInfo which exercise the various ways | 578 // TODO(rtenneti): Add unittests for GetSSLInfo which exercise the various ways |
| 574 // we learn about SSL info (sync vs async vs cached). | 579 // we learn about SSL info (sync vs async vs cached). |
| 575 bool QuicChromiumClientSession::GetSSLInfo(SSLInfo* ssl_info) const { | 580 bool QuicChromiumClientSession::GetSSLInfo(SSLInfo* ssl_info) const { |
| 576 ssl_info->Reset(); | 581 ssl_info->Reset(); |
| 577 if (!cert_verify_result_) { | 582 if (!cert_verify_result_) { |
| (...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 } | 1521 } |
| 1517 | 1522 |
| 1518 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { | 1523 size_t QuicChromiumClientSession::EstimateMemoryUsage() const { |
| 1519 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's | 1524 // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's |
| 1520 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and | 1525 // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and |
| 1521 // unacked packet map. | 1526 // unacked packet map. |
| 1522 return base::trace_event::EstimateMemoryUsage(packet_readers_); | 1527 return base::trace_event::EstimateMemoryUsage(packet_readers_); |
| 1523 } | 1528 } |
| 1524 | 1529 |
| 1525 } // namespace net | 1530 } // namespace net |
| OLD | NEW |