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

Side by Side Diff: net/spdy/spdy_stream.cc

Issue 10382107: Change the stream_id for streams which are serialized out of order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 8 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/spdy/spdy_session_spdy3_unittest.cc ('k') | no next file » | 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/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 DCHECK(response_received()); 512 DCHECK(response_received());
513 return ERR_IO_PENDING; 513 return ERR_IO_PENDING;
514 } 514 }
515 CHECK_EQ(STATE_NONE, io_state_); 515 CHECK_EQ(STATE_NONE, io_state_);
516 io_state_ = STATE_GET_DOMAIN_BOUND_CERT; 516 io_state_ = STATE_GET_DOMAIN_BOUND_CERT;
517 return DoLoop(OK); 517 return DoLoop(OK);
518 } 518 }
519 519
520 int SpdyStream::WriteStreamData(IOBuffer* data, int length, 520 int SpdyStream::WriteStreamData(IOBuffer* data, int length,
521 SpdyDataFlags flags) { 521 SpdyDataFlags flags) {
522 // Until the headers have been completely sent, we can not be sure
523 // that our stream_id is correct.
524 DCHECK_GT(io_state_, STATE_SEND_HEADERS_COMPLETE);
522 return session_->WriteStreamData(stream_id_, data, length, flags); 525 return session_->WriteStreamData(stream_id_, data, length, flags);
523 } 526 }
524 527
525 bool SpdyStream::GetSSLInfo(SSLInfo* ssl_info, 528 bool SpdyStream::GetSSLInfo(SSLInfo* ssl_info,
526 bool* was_npn_negotiated, 529 bool* was_npn_negotiated,
527 NextProto* protocol_negotiated) { 530 NextProto* protocol_negotiated) {
528 return session_->GetSSLInfo( 531 return session_->GetSSLInfo(
529 ssl_info, was_npn_negotiated, protocol_negotiated); 532 ssl_info, was_npn_negotiated, protocol_negotiated);
530 } 533 }
531 534
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", 771 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime",
769 recv_last_byte_time_ - recv_first_byte_time_); 772 recv_last_byte_time_ - recv_first_byte_time_);
770 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", 773 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime",
771 recv_last_byte_time_ - send_time_); 774 recv_last_byte_time_ - send_time_);
772 775
773 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); 776 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_);
774 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); 777 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_);
775 } 778 }
776 779
777 } // namespace net 780 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session_spdy3_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698