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

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

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 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
« no previous file with comments | « net/quic/quic_config.cc ('k') | net/quic/quic_crypto_client_stream.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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 return group_map_[fec_group_num]; 1155 return group_map_[fec_group_num];
1156 } 1156 }
1157 1157
1158 void QuicConnection::SendConnectionClose(QuicErrorCode error) { 1158 void QuicConnection::SendConnectionClose(QuicErrorCode error) {
1159 SendConnectionCloseWithDetails(error, string()); 1159 SendConnectionCloseWithDetails(error, string());
1160 } 1160 }
1161 1161
1162 void QuicConnection::SendConnectionClosePacket(QuicErrorCode error, 1162 void QuicConnection::SendConnectionClosePacket(QuicErrorCode error,
1163 const string& details) { 1163 const string& details) {
1164 DLOG(INFO) << ENDPOINT << "Force closing with error " 1164 DLOG(INFO) << ENDPOINT << "Force closing with error "
1165 << QuicUtils::ErrorToString(error) << " (" << error << ")"; 1165 << QuicUtils::ErrorToString(error) << " (" << error << ") "
1166 << details;
1166 QuicConnectionCloseFrame frame; 1167 QuicConnectionCloseFrame frame;
1167 frame.error_code = error; 1168 frame.error_code = error;
1168 frame.error_details = details; 1169 frame.error_details = details;
1169 UpdateOutgoingAck(); 1170 UpdateOutgoingAck();
1170 frame.ack_frame = outgoing_ack_; 1171 frame.ack_frame = outgoing_ack_;
1171 1172
1172 SerializedPacket serialized_packet = 1173 SerializedPacket serialized_packet =
1173 packet_creator_.SerializeConnectionClose(&frame); 1174 packet_creator_.SerializeConnectionClose(&frame);
1174 1175
1175 // We need to update the sent entrophy hash for all sent packets. 1176 // We need to update the sent entrophy hash for all sent packets.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 << " delta:" << delta.ToMicroseconds(); 1242 << " delta:" << delta.ToMicroseconds();
1242 if (delta >= timeout_) { 1243 if (delta >= timeout_) {
1243 SendConnectionClose(QUIC_CONNECTION_TIMED_OUT); 1244 SendConnectionClose(QUIC_CONNECTION_TIMED_OUT);
1244 return true; 1245 return true;
1245 } 1246 }
1246 helper_->SetTimeoutAlarm(timeout_.Subtract(delta)); 1247 helper_->SetTimeoutAlarm(timeout_.Subtract(delta));
1247 return false; 1248 return false;
1248 } 1249 }
1249 1250
1250 } // namespace net 1251 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_config.cc ('k') | net/quic/quic_crypto_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698