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

Side by Side Diff: net/spdy/spdy_websocket_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_websocket_stream.h ('k') | no next file » | 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_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 "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 return ERR_UNEXPECTED; 100 return ERR_UNEXPECTED;
101 } 101 }
102 102
103 int SpdyWebSocketStream::OnResponseReceived( 103 int SpdyWebSocketStream::OnResponseReceived(
104 const SpdyHeaderBlock& response, 104 const SpdyHeaderBlock& response,
105 base::Time response_time, int status) { 105 base::Time response_time, int status) {
106 DCHECK(delegate_); 106 DCHECK(delegate_);
107 return delegate_->OnReceivedSpdyResponseHeader(response, status); 107 return delegate_->OnReceivedSpdyResponseHeader(response, status);
108 } 108 }
109 109
110 void SpdyWebSocketStream::OnHeadersSent() {
111 // This will be called when WebSocket over SPDY supports new framing.
112 NOTREACHED();
113 }
114
110 int SpdyWebSocketStream::OnDataReceived(const char* data, int length) { 115 int SpdyWebSocketStream::OnDataReceived(const char* data, int length) {
111 DCHECK(delegate_); 116 DCHECK(delegate_);
112 delegate_->OnReceivedSpdyData(data, length); 117 delegate_->OnReceivedSpdyData(data, length);
113 return OK; 118 return OK;
114 } 119 }
115 120
116 void SpdyWebSocketStream::OnDataSent(int length) { 121 void SpdyWebSocketStream::OnDataSent(int length) {
117 DCHECK(delegate_); 122 DCHECK(delegate_);
118 delegate_->OnSentSpdyData(length); 123 delegate_->OnSentSpdyData(length);
119 } 124 }
(...skipping 13 matching lines...) Expand all
133 DCHECK_NE(ERR_IO_PENDING, result); 138 DCHECK_NE(ERR_IO_PENDING, result);
134 if (result == OK) { 139 if (result == OK) {
135 DCHECK(stream_); 140 DCHECK(stream_);
136 stream_->SetDelegate(this); 141 stream_->SetDelegate(this);
137 } 142 }
138 DCHECK(delegate_); 143 DCHECK(delegate_);
139 delegate_->OnCreatedSpdyStream(result); 144 delegate_->OnCreatedSpdyStream(result);
140 } 145 }
141 146
142 } // namespace net 147 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_websocket_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698