OLD | NEW |
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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 DCHECK(session_->IsStreamActive(stream_id_)); | 467 DCHECK(session_->IsStreamActive(stream_id_)); |
468 | 468 |
469 // If we're still buffering data for a push stream, we will do the | 469 // If we're still buffering data for a push stream, we will do the |
470 // check for data received with incomplete headers in | 470 // check for data received with incomplete headers in |
471 // PushedStreamReplayData(). | 471 // PushedStreamReplayData(). |
472 if (io_state_ == STATE_HALF_CLOSED_LOCAL_UNCLAIMED) { | 472 if (io_state_ == STATE_HALF_CLOSED_LOCAL_UNCLAIMED) { |
473 DCHECK_EQ(type_, SPDY_PUSH_STREAM); | 473 DCHECK_EQ(type_, SPDY_PUSH_STREAM); |
474 // It should be valid for this to happen in the server push case. | 474 // It should be valid for this to happen in the server push case. |
475 // We'll return received data when delegate gets attached to the stream. | 475 // We'll return received data when delegate gets attached to the stream. |
476 if (buffer) { | 476 if (buffer) { |
477 pending_recv_data_.push_back(buffer.release()); | 477 pending_recv_data_.push_back(buffer.Pass()); |
478 } else { | 478 } else { |
479 pending_recv_data_.push_back(NULL); | 479 pending_recv_data_.push_back(NULL); |
480 // Note: we leave the stream open in the session until the stream | 480 // Note: we leave the stream open in the session until the stream |
481 // is claimed. | 481 // is claimed. |
482 } | 482 } |
483 return; | 483 return; |
484 } | 484 } |
485 | 485 |
486 // If we have response headers but the delegate has indicated that | 486 // If we have response headers but the delegate has indicated that |
487 // it's still incomplete, then that's a protocol error. | 487 // it's still incomplete, then that's a protocol error. |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 924 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
925 state); | 925 state); |
926 break; | 926 break; |
927 } | 927 } |
928 return description; | 928 return description; |
929 } | 929 } |
930 | 930 |
931 #undef STATE_CASE | 931 #undef STATE_CASE |
932 | 932 |
933 } // namespace net | 933 } // namespace net |
OLD | NEW |