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

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

Issue 1190823003: Remove dependency on headers stream from QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0616
Patch Set: deleted an include Created 5 years, 6 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/quic/quic_connection.h ('k') | net/quic/quic_connection_logger.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 (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_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 2094
2095 timeout_alarm_->Cancel(); 2095 timeout_alarm_->Cancel();
2096 timeout_alarm_->Set(deadline); 2096 timeout_alarm_->Set(deadline);
2097 } 2097 }
2098 2098
2099 void QuicConnection::SetPingAlarm() { 2099 void QuicConnection::SetPingAlarm() {
2100 if (perspective_ == Perspective::IS_SERVER) { 2100 if (perspective_ == Perspective::IS_SERVER) {
2101 // Only clients send pings. 2101 // Only clients send pings.
2102 return; 2102 return;
2103 } 2103 }
2104 if (!visitor_->HasOpenDataStreams()) { 2104 if (!visitor_->HasOpenDynamicStreams()) {
2105 ping_alarm_->Cancel(); 2105 ping_alarm_->Cancel();
2106 // Don't send a ping unless there are open streams. 2106 // Don't send a ping unless there are open streams.
2107 return; 2107 return;
2108 } 2108 }
2109 QuicTime::Delta ping_timeout = QuicTime::Delta::FromSeconds(kPingTimeoutSecs); 2109 QuicTime::Delta ping_timeout = QuicTime::Delta::FromSeconds(kPingTimeoutSecs);
2110 ping_alarm_->Update(clock_->ApproximateNow().Add(ping_timeout), 2110 ping_alarm_->Update(clock_->ApproximateNow().Add(ping_timeout),
2111 QuicTime::Delta::FromSeconds(1)); 2111 QuicTime::Delta::FromSeconds(1));
2112 } 2112 }
2113 2113
2114 QuicConnection::ScopedPacketBundler::ScopedPacketBundler( 2114 QuicConnection::ScopedPacketBundler::ScopedPacketBundler(
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 } 2169 }
2170 for (const QuicFrame& frame : retransmittable_frames->frames()) { 2170 for (const QuicFrame& frame : retransmittable_frames->frames()) {
2171 if (frame.type == CONNECTION_CLOSE_FRAME) { 2171 if (frame.type == CONNECTION_CLOSE_FRAME) {
2172 return true; 2172 return true;
2173 } 2173 }
2174 } 2174 }
2175 return false; 2175 return false;
2176 } 2176 }
2177 2177
2178 } // namespace net 2178 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698