Chromium Code Reviews| 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_websocket_stream.h" | 5 #include "net/spdy/spdy_websocket_stream.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 DCHECK(!stream_); | 79 DCHECK(!stream_); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 SpdySendStatus SpdyWebSocketStream::OnSendHeadersComplete() { | 83 SpdySendStatus SpdyWebSocketStream::OnSendHeadersComplete() { |
| 84 DCHECK(delegate_); | 84 DCHECK(delegate_); |
| 85 delegate_->OnSentSpdyHeaders(); | 85 delegate_->OnSentSpdyHeaders(); |
| 86 return NO_MORE_DATA_TO_SEND; | 86 return NO_MORE_DATA_TO_SEND; |
| 87 } | 87 } |
| 88 | 88 |
| 89 int SpdyWebSocketStream::OnSendBody() { | 89 void SpdyWebSocketStream::OnSendBody() { |
| 90 NOTREACHED(); | 90 CHECK(false); |
|
Ryan Hamilton
2013/05/22 03:17:30
You sure like checks :>
| |
| 91 return ERR_UNEXPECTED; | |
| 92 } | 91 } |
| 93 | 92 |
| 94 SpdySendStatus SpdyWebSocketStream::OnSendBodyComplete(size_t bytes_sent) { | 93 SpdySendStatus SpdyWebSocketStream::OnSendBodyComplete(size_t bytes_sent) { |
| 95 NOTREACHED(); | 94 CHECK(false); |
| 96 return NO_MORE_DATA_TO_SEND; | 95 return NO_MORE_DATA_TO_SEND; |
| 97 } | 96 } |
| 98 | 97 |
| 99 int SpdyWebSocketStream::OnResponseReceived( | 98 int SpdyWebSocketStream::OnResponseReceived( |
| 100 const SpdyHeaderBlock& response, | 99 const SpdyHeaderBlock& response, |
| 101 base::Time response_time, int status) { | 100 base::Time response_time, int status) { |
| 102 DCHECK(delegate_); | 101 DCHECK(delegate_); |
| 103 return delegate_->OnReceivedSpdyResponseHeader(response, status); | 102 return delegate_->OnReceivedSpdyResponseHeader(response, status); |
| 104 } | 103 } |
| 105 | 104 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 135 if (result == OK) { | 134 if (result == OK) { |
| 136 stream_ = stream_request_.ReleaseStream(); | 135 stream_ = stream_request_.ReleaseStream(); |
| 137 DCHECK(stream_); | 136 DCHECK(stream_); |
| 138 stream_->SetDelegate(this); | 137 stream_->SetDelegate(this); |
| 139 } | 138 } |
| 140 DCHECK(delegate_); | 139 DCHECK(delegate_); |
| 141 delegate_->OnCreatedSpdyStream(result); | 140 delegate_->OnCreatedSpdyStream(result); |
| 142 } | 141 } |
| 143 | 142 |
| 144 } // namespace net | 143 } // namespace net |
| OLD | NEW |