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

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

Issue 15892015: [SPDY] Refactor SpdyStream state machine (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove default: Created 7 years, 6 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_network_transaction_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_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 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if (stream_) { 285 if (stream_) {
286 stream_->Cancel(); 286 stream_->Cancel();
287 DCHECK(!stream_); 287 DCHECK(!stream_);
288 } 288 }
289 } 289 }
290 290
291 void SpdyHttpStream::OnRequestHeadersSent() { 291 void SpdyHttpStream::OnRequestHeadersSent() {
292 if (!callback_.is_null()) 292 if (!callback_.is_null())
293 DoCallback(OK); 293 DoCallback(OK);
294 294
295 // TODO(akalin): Do this immediately after sending the request
296 // headers.
295 if (HasUploadData()) 297 if (HasUploadData())
296 ReadAndSendRequestBodyData(); 298 ReadAndSendRequestBodyData();
297 } 299 }
298 300
299 int SpdyHttpStream::OnResponseHeadersReceived(const SpdyHeaderBlock& response, 301 int SpdyHttpStream::OnResponseHeadersReceived(const SpdyHeaderBlock& response,
300 base::Time response_time, 302 base::Time response_time,
301 int status) { 303 int status) {
302 if (!response_info_) { 304 if (!response_info_) {
303 DCHECK_EQ(stream_->type(), SPDY_PUSH_STREAM); 305 DCHECK_EQ(stream_->type(), SPDY_PUSH_STREAM);
304 push_response_info_.reset(new HttpResponseInfo); 306 push_response_info_.reset(new HttpResponseInfo);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 bool SpdyHttpStream::IsSpdyHttpStream() const { 545 bool SpdyHttpStream::IsSpdyHttpStream() const {
544 return true; 546 return true;
545 } 547 }
546 548
547 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 549 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
548 Close(false); 550 Close(false);
549 delete this; 551 delete this;
550 } 552 }
551 553
552 } // namespace net 554 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_network_transaction_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698