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

Side by Side Diff: net/quic/quic_session.cc

Issue 243533003: Sent QUIC "PING" frames when a stream is open and the connection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
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_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/proof_verifier.h" 8 #include "net/quic/crypto/proof_verifier.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_headers_stream.h" 10 #include "net/quic/quic_headers_stream.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 virtual bool HasPendingWrites() const OVERRIDE { 81 virtual bool HasPendingWrites() const OVERRIDE {
82 return session_->HasPendingWrites(); 82 return session_->HasPendingWrites();
83 } 83 }
84 84
85 virtual bool HasPendingHandshake() const OVERRIDE { 85 virtual bool HasPendingHandshake() const OVERRIDE {
86 return session_->HasPendingHandshake(); 86 return session_->HasPendingHandshake();
87 } 87 }
88 88
89 virtual bool HasOpenStreams() const override {
ramant (doing other things) 2014/04/18 21:20:01 nit: override -> OVERRIDE
90 return session_->HasOpenStreams();
91 }
92
89 private: 93 private:
90 QuicSession* session_; 94 QuicSession* session_;
91 }; 95 };
92 96
93 QuicSession::QuicSession(QuicConnection* connection, 97 QuicSession::QuicSession(QuicConnection* connection,
94 const QuicConfig& config) 98 const QuicConfig& config)
95 : connection_(connection), 99 : connection_(connection),
96 visitor_shim_(new VisitorShim(this)), 100 visitor_shim_(new VisitorShim(this)),
97 config_(config), 101 config_(config),
98 max_open_streams_(config_.max_streams_per_connection()), 102 max_open_streams_(config_.max_streams_per_connection()),
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 298 }
295 299
296 bool QuicSession::HasPendingWrites() const { 300 bool QuicSession::HasPendingWrites() const {
297 return write_blocked_streams_.HasWriteBlockedStreams(); 301 return write_blocked_streams_.HasWriteBlockedStreams();
298 } 302 }
299 303
300 bool QuicSession::HasPendingHandshake() const { 304 bool QuicSession::HasPendingHandshake() const {
301 return has_pending_handshake_; 305 return has_pending_handshake_;
302 } 306 }
303 307
308 bool QuicSession::HasOpenStreams() const {
309 return GetNumOpenStreams() > 0;
310 }
311
304 QuicConsumedData QuicSession::WritevData( 312 QuicConsumedData QuicSession::WritevData(
305 QuicStreamId id, 313 QuicStreamId id,
306 const IOVector& data, 314 const IOVector& data,
307 QuicStreamOffset offset, 315 QuicStreamOffset offset,
308 bool fin, 316 bool fin,
309 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) { 317 QuicAckNotifier::DelegateInterface* ack_notifier_delegate) {
310 return connection_->SendStreamData(id, data, offset, fin, 318 return connection_->SendStreamData(id, data, offset, fin,
311 ack_notifier_delegate); 319 ack_notifier_delegate);
312 } 320 }
313 321
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 NOTIMPLEMENTED(); 597 NOTIMPLEMENTED();
590 return false; 598 return false;
591 } 599 }
592 600
593 void QuicSession::PostProcessAfterData() { 601 void QuicSession::PostProcessAfterData() {
594 STLDeleteElements(&closed_streams_); 602 STLDeleteElements(&closed_streams_);
595 closed_streams_.clear(); 603 closed_streams_.clear();
596 } 604 }
597 605
598 } // namespace net 606 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698