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

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

Issue 371273003: Reland "Separate client and server pushed streams limits." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix active push stream count Created 6 years, 5 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
« no previous file with comments | « net/spdy/spdy_stream_test_util.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_stream_test_util.h" 5 #include "net/spdy/spdy_stream_test_util.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 buf_(new StringIOBuffer(data.as_string())) {} 134 buf_(new StringIOBuffer(data.as_string())) {}
135 135
136 StreamDelegateWithBody::~StreamDelegateWithBody() { 136 StreamDelegateWithBody::~StreamDelegateWithBody() {
137 } 137 }
138 138
139 void StreamDelegateWithBody::OnRequestHeadersSent() { 139 void StreamDelegateWithBody::OnRequestHeadersSent() {
140 StreamDelegateBase::OnRequestHeadersSent(); 140 StreamDelegateBase::OnRequestHeadersSent();
141 stream()->SendData(buf_.get(), buf_->size(), NO_MORE_DATA_TO_SEND); 141 stream()->SendData(buf_.get(), buf_->size(), NO_MORE_DATA_TO_SEND);
142 } 142 }
143 143
144 StreamDelegateCloseOnHeaders::StreamDelegateCloseOnHeaders(
145 const base::WeakPtr<SpdyStream>& stream)
146 : StreamDelegateBase(stream) {
147 }
148
149 StreamDelegateCloseOnHeaders::~StreamDelegateCloseOnHeaders() {
150 }
151
152 SpdyResponseHeadersStatus
153 StreamDelegateCloseOnHeaders::OnResponseHeadersUpdated(
154 const SpdyHeaderBlock& response_headers) {
155 stream()->Cancel();
156 return RESPONSE_HEADERS_ARE_COMPLETE;
157 }
158
144 } // namespace test 159 } // namespace test
145 160
146 } // namespace net 161 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698