| 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/quic_chromium_client_session.h" | 5 #include "net/quic/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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 } | 644 } |
| 645 return CreateIncomingReliableStreamImpl(id); | 645 return CreateIncomingReliableStreamImpl(id); |
| 646 } | 646 } |
| 647 | 647 |
| 648 QuicChromiumClientStream* | 648 QuicChromiumClientStream* |
| 649 QuicChromiumClientSession::CreateIncomingReliableStreamImpl(QuicStreamId id) { | 649 QuicChromiumClientSession::CreateIncomingReliableStreamImpl(QuicStreamId id) { |
| 650 DCHECK(connection()->connected()); | 650 DCHECK(connection()->connected()); |
| 651 QuicChromiumClientStream* stream = | 651 QuicChromiumClientStream* stream = |
| 652 new QuicChromiumClientStream(id, this, net_log_); | 652 new QuicChromiumClientStream(id, this, net_log_); |
| 653 stream->CloseWriteSide(); | 653 stream->CloseWriteSide(); |
| 654 ActivateStream(stream); |
| 654 ++num_total_streams_; | 655 ++num_total_streams_; |
| 655 return stream; | 656 return stream; |
| 656 } | 657 } |
| 657 | 658 |
| 658 void QuicChromiumClientSession::CloseStream(QuicStreamId stream_id) { | 659 void QuicChromiumClientSession::CloseStream(QuicStreamId stream_id) { |
| 659 ReliableQuicStream* stream = GetStream(stream_id); | 660 ReliableQuicStream* stream = GetStream(stream_id); |
| 660 if (stream) { | 661 if (stream) { |
| 661 logger_->UpdateReceivedFrameCounts(stream_id, stream->num_frames_received(), | 662 logger_->UpdateReceivedFrameCounts(stream_id, stream->num_frames_received(), |
| 662 stream->num_duplicate_frames_received()); | 663 stream->num_duplicate_frames_received()); |
| 663 } | 664 } |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 DCHECK(sockets_.back().get() != nullptr); | 1103 DCHECK(sockets_.back().get() != nullptr); |
| 1103 // The most recently added socket is the currently active one. | 1104 // The most recently added socket is the currently active one. |
| 1104 return sockets_.back().get(); | 1105 return sockets_.back().get(); |
| 1105 } | 1106 } |
| 1106 | 1107 |
| 1107 bool QuicChromiumClientSession::IsAuthorized(const std::string& hostname) { | 1108 bool QuicChromiumClientSession::IsAuthorized(const std::string& hostname) { |
| 1108 return CanPool(hostname, server_id_.privacy_mode()); | 1109 return CanPool(hostname, server_id_.privacy_mode()); |
| 1109 } | 1110 } |
| 1110 | 1111 |
| 1111 } // namespace net | 1112 } // namespace net |
| OLD | NEW |