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

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

Issue 14287009: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Tot Created 7 years, 7 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_protocol.cc ('k') | net/quic/quic_utils.cc » ('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_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/quic_connection.h" 8 #include "net/quic/quic_connection.h"
9 9
10 using base::StringPiece; 10 using base::StringPiece;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 void QuicSession::CloseStream(QuicStreamId stream_id) { 179 void QuicSession::CloseStream(QuicStreamId stream_id) {
180 DLOG(INFO) << "Closing stream " << stream_id; 180 DLOG(INFO) << "Closing stream " << stream_id;
181 181
182 ReliableStreamMap::iterator it = stream_map_.find(stream_id); 182 ReliableStreamMap::iterator it = stream_map_.find(stream_id);
183 if (it == stream_map_.end()) { 183 if (it == stream_map_.end()) {
184 DLOG(INFO) << "Stream is already closed: " << stream_id; 184 DLOG(INFO) << "Stream is already closed: " << stream_id;
185 return; 185 return;
186 } 186 }
187 it->second->OnClose(); 187 ReliableQuicStream* stream = it->second;
188 closed_streams_.push_back(it->second); 188 closed_streams_.push_back(it->second);
189 stream_map_.erase(it); 189 stream_map_.erase(it);
190 stream->OnClose();
190 } 191 }
191 192
192 bool QuicSession::IsCryptoHandshakeComplete() { 193 bool QuicSession::IsCryptoHandshakeComplete() {
193 return GetCryptoStream()->handshake_complete(); 194 return GetCryptoStream()->handshake_complete();
194 } 195 }
195 196
196 void QuicSession::OnCryptoHandshakeComplete(QuicErrorCode error) { 197 void QuicSession::OnCryptoHandshakeComplete(QuicErrorCode error) {
197 // TODO(rch): tear down the connection if error != QUIC_NO_ERROR. 198 // TODO(rch): tear down the connection if error != QUIC_NO_ERROR.
198 } 199 }
199 200
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 void QuicSession::MarkWriteBlocked(QuicStreamId id) { 298 void QuicSession::MarkWriteBlocked(QuicStreamId id) {
298 write_blocked_streams_.AddBlockedObject(id); 299 write_blocked_streams_.AddBlockedObject(id);
299 } 300 }
300 301
301 void QuicSession::PostProcessAfterData() { 302 void QuicSession::PostProcessAfterData() {
302 STLDeleteElements(&closed_streams_); 303 STLDeleteElements(&closed_streams_);
303 closed_streams_.clear(); 304 closed_streams_.clear();
304 } 305 }
305 306
306 } // namespace net 307 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.cc ('k') | net/quic/quic_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698