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

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

Issue 10828129: SPDY: WriteHeaders should not invoke OnDataSent callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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_http_stream.h ('k') | net/spdy/spdy_proxy_client_socket.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/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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // TODO(ahendrickson): This is recorded after the entire SYN_STREAM control 404 // TODO(ahendrickson): This is recorded after the entire SYN_STREAM control
405 // frame has been received and processed. Move to framer? 405 // frame has been received and processed. Move to framer?
406 response_info_->response_time = response_time; 406 response_info_->response_time = response_time;
407 407
408 if (!callback_.is_null()) 408 if (!callback_.is_null())
409 DoCallback(status); 409 DoCallback(status);
410 410
411 return status; 411 return status;
412 } 412 }
413 413
414 void SpdyHttpStream::OnHeadersSent() {
415 // For HTTP streams, no HEADERS frame is sent from the client.
416 NOTREACHED();
417 }
418
414 int SpdyHttpStream::OnDataReceived(const char* data, int length) { 419 int SpdyHttpStream::OnDataReceived(const char* data, int length) {
415 // SpdyStream won't call us with data if the header block didn't contain a 420 // SpdyStream won't call us with data if the header block didn't contain a
416 // valid set of headers. So we don't expect to not have headers received 421 // valid set of headers. So we don't expect to not have headers received
417 // here. 422 // here.
418 if (!response_headers_received_) 423 if (!response_headers_received_)
419 return ERR_INCOMPLETE_SPDY_HEADERS; 424 return ERR_INCOMPLETE_SPDY_HEADERS;
420 425
421 // Note that data may be received for a SpdyStream prior to the user calling 426 // Note that data may be received for a SpdyStream prior to the user calling
422 // ReadResponseBody(), therefore user_buffer_ may be NULL. This may often 427 // ReadResponseBody(), therefore user_buffer_ may be NULL. This may often
423 // happen for server initiated streams. 428 // happen for server initiated streams.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 bool SpdyHttpStream::IsSpdyHttpStream() const { 557 bool SpdyHttpStream::IsSpdyHttpStream() const {
553 return true; 558 return true;
554 } 559 }
555 560
556 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 561 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
557 Close(false); 562 Close(false);
558 delete this; 563 delete this;
559 } 564 }
560 565
561 } // namespace net 566 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream.h ('k') | net/spdy/spdy_proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698