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

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

Issue 15555003: [SPDY] Remove SpdyStream::Delegate::OnSendBody()'s return value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo 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/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_spdy3_unittest.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/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 // DoSendBody is called to send the optional body for the request. This call 903 // DoSendBody is called to send the optional body for the request. This call
904 // will also be called as each write of a chunk of the body completes. 904 // will also be called as each write of a chunk of the body completes.
905 int SpdyStream::DoSendBody() { 905 int SpdyStream::DoSendBody() {
906 // If we're already in the STATE_SEND_BODY state, then we've already 906 // If we're already in the STATE_SEND_BODY state, then we've already
907 // sent a portion of the body. In that case, we need to first consume 907 // sent a portion of the body. In that case, we need to first consume
908 // the bytes written in the body stream. Note that the bytes written is 908 // the bytes written in the body stream. Note that the bytes written is
909 // the number of bytes in the frame that were written, only consume the 909 // the number of bytes in the frame that were written, only consume the
910 // data portion, of course. 910 // data portion, of course.
911 io_state_ = STATE_SEND_BODY_COMPLETE; 911 io_state_ = STATE_SEND_BODY_COMPLETE;
912 CHECK(delegate_); 912 CHECK(delegate_);
913 int status = delegate_->OnSendBody(); 913 delegate_->OnSendBody();
914 CHECK(status == OK || status == ERR_IO_PENDING); 914 return ERR_IO_PENDING;
915 return status;
916 } 915 }
917 916
918 int SpdyStream::DoSendBodyComplete(int result) { 917 int SpdyStream::DoSendBodyComplete(int result) {
919 if (result != OK) 918 if (result != OK)
920 return result; 919 return result;
921 920
922 if (just_completed_frame_type_ != DATA) { 921 if (just_completed_frame_type_ != DATA) {
923 NOTREACHED(); 922 NOTREACHED();
924 return ERR_UNEXPECTED; 923 return ERR_UNEXPECTED;
925 } 924 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime", 996 UMA_HISTOGRAM_TIMES("Net.SpdyStreamDownloadTime",
998 recv_last_byte_time_ - recv_first_byte_time_); 997 recv_last_byte_time_ - recv_first_byte_time_);
999 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime", 998 UMA_HISTOGRAM_TIMES("Net.SpdyStreamTime",
1000 recv_last_byte_time_ - send_time_); 999 recv_last_byte_time_ - send_time_);
1001 1000
1002 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_); 1001 UMA_HISTOGRAM_COUNTS("Net.SpdySendBytes", send_bytes_);
1003 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_); 1002 UMA_HISTOGRAM_COUNTS("Net.SpdyRecvBytes", recv_bytes_);
1004 } 1003 }
1005 1004
1006 } // namespace net 1005 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698