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

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

Issue 9392030: SPDY Proxy - Bug fix to handle flow control (spdy/2.1) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « no previous file | net/spdy/spdy_proxy_client_socket.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_http_stream.h" 5 #include "net/spdy/spdy_http_stream.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } else { 122 } else {
123 const int bytes_remaining = data->size() - bytes_to_copy; 123 const int bytes_remaining = data->size() - bytes_to_copy;
124 IOBufferWithSize* new_buffer = new IOBufferWithSize(bytes_remaining); 124 IOBufferWithSize* new_buffer = new IOBufferWithSize(bytes_remaining);
125 memcpy(new_buffer->data(), &(data->data()[bytes_to_copy]), 125 memcpy(new_buffer->data(), &(data->data()[bytes_to_copy]),
126 bytes_remaining); 126 bytes_remaining);
127 response_body_.pop_front(); 127 response_body_.pop_front();
128 response_body_.push_front(make_scoped_refptr(new_buffer)); 128 response_body_.push_front(make_scoped_refptr(new_buffer));
129 } 129 }
130 bytes_read += bytes_to_copy; 130 bytes_read += bytes_to_copy;
131 } 131 }
132 if (spdy_session_ && spdy_session_->is_flow_control_enabled()) 132 if (spdy_session_)
willchan no longer on Chromium 2012/02/14 19:16:44 We don't need this if statement at all, do we?
ramant (doing other things) 2012/02/16 00:23:15 Done.
133 stream_->IncreaseRecvWindowSize(bytes_read); 133 stream_->IncreaseRecvWindowSize(bytes_read);
134 return bytes_read; 134 return bytes_read;
135 } else if (stream_->closed()) { 135 } else if (stream_->closed()) {
136 return stream_->response_status(); 136 return stream_->response_status();
137 } 137 }
138 138
139 CHECK(callback_.is_null()); 139 CHECK(callback_.is_null());
140 CHECK(!user_buffer_); 140 CHECK(!user_buffer_);
141 CHECK_EQ(0, user_buffer_len_); 141 CHECK_EQ(0, user_buffer_len_);
142 142
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 bool SpdyHttpStream::IsSpdyHttpStream() const { 492 bool SpdyHttpStream::IsSpdyHttpStream() const {
493 return true; 493 return true;
494 } 494 }
495 495
496 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 496 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
497 Close(false); 497 Close(false);
498 delete this; 498 delete this;
499 } 499 }
500 500
501 } // namespace net 501 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_proxy_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698