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

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

Issue 2174943002: Avoid SpdyHeaderBlock copy in SpdyStream::OnPushPromiseHeadersReceived(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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_unittest.cc ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_test_util_common.h" 5 #include "net/spdy/spdy_test_util_common.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <utility> 10 #include <utility>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 void OnError(SpdyFramer::SpdyError error_code) override {} 188 void OnError(SpdyFramer::SpdyError error_code) override {}
189 void OnStreamError(SpdyStreamId stream_id, 189 void OnStreamError(SpdyStreamId stream_id,
190 const std::string& description) override {} 190 const std::string& description) override {}
191 void OnHeaders(SpdyStreamId stream_id, 191 void OnHeaders(SpdyStreamId stream_id,
192 bool has_priority, 192 bool has_priority,
193 int weight, 193 int weight,
194 SpdyStreamId parent_stream_id, 194 SpdyStreamId parent_stream_id,
195 bool exclusive, 195 bool exclusive,
196 bool fin, 196 bool fin,
197 const SpdyHeaderBlock& headers) override { 197 SpdyHeaderBlock headers) override {
198 if (has_priority) { 198 if (has_priority) {
199 priority_ = Http2WeightToSpdy3Priority(weight); 199 priority_ = Http2WeightToSpdy3Priority(weight);
200 } 200 }
201 } 201 }
202 void OnDataFrameHeader(SpdyStreamId stream_id, 202 void OnDataFrameHeader(SpdyStreamId stream_id,
203 size_t length, 203 size_t length,
204 bool fin) override {} 204 bool fin) override {}
205 void OnStreamFrameData(SpdyStreamId stream_id, 205 void OnStreamFrameData(SpdyStreamId stream_id,
206 const char* data, 206 const char* data,
207 size_t len) override {} 207 size_t len) override {}
208 void OnStreamEnd(SpdyStreamId stream_id) override {} 208 void OnStreamEnd(SpdyStreamId stream_id) override {}
209 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override {} 209 void OnStreamPadding(SpdyStreamId stream_id, size_t len) override {}
210 void OnSettings(bool clear_persisted) override {} 210 void OnSettings(bool clear_persisted) override {}
211 void OnSetting(SpdySettingsIds id, uint8_t flags, uint32_t value) override {} 211 void OnSetting(SpdySettingsIds id, uint8_t flags, uint32_t value) override {}
212 void OnPing(SpdyPingId unique_id, bool is_ack) override {} 212 void OnPing(SpdyPingId unique_id, bool is_ack) override {}
213 void OnRstStream(SpdyStreamId stream_id, 213 void OnRstStream(SpdyStreamId stream_id,
214 SpdyRstStreamStatus status) override {} 214 SpdyRstStreamStatus status) override {}
215 void OnGoAway(SpdyStreamId last_accepted_stream_id, 215 void OnGoAway(SpdyStreamId last_accepted_stream_id,
216 SpdyGoAwayStatus status, 216 SpdyGoAwayStatus status,
217 base::StringPiece debug_data) override {} 217 base::StringPiece debug_data) override {}
218 void OnWindowUpdate(SpdyStreamId stream_id, int delta_window_size) override {} 218 void OnWindowUpdate(SpdyStreamId stream_id, int delta_window_size) override {}
219 void OnPushPromise(SpdyStreamId stream_id, 219 void OnPushPromise(SpdyStreamId stream_id,
220 SpdyStreamId promised_stream_id, 220 SpdyStreamId promised_stream_id,
221 const SpdyHeaderBlock& headers) override {} 221 SpdyHeaderBlock headers) override {}
222 void OnAltSvc(SpdyStreamId stream_id, 222 void OnAltSvc(SpdyStreamId stream_id,
223 base::StringPiece origin, 223 base::StringPiece origin,
224 const SpdyAltSvcWireFormat::AlternativeServiceVector& 224 const SpdyAltSvcWireFormat::AlternativeServiceVector&
225 altsvc_vector) override {} 225 altsvc_vector) override {}
226 bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override { 226 bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override {
227 return false; 227 return false;
228 } 228 }
229 229
230 private: 230 private:
231 SpdyPriority priority_; 231 SpdyPriority priority_;
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 } 1100 }
1101 return headers; 1101 return headers;
1102 } 1102 }
1103 1103
1104 void SpdyTestUtil::SetPriority(RequestPriority priority, 1104 void SpdyTestUtil::SetPriority(RequestPriority priority,
1105 SpdySynStreamIR* ir) const { 1105 SpdySynStreamIR* ir) const {
1106 ir->set_priority(ConvertRequestPriorityToSpdyPriority(priority)); 1106 ir->set_priority(ConvertRequestPriorityToSpdyPriority(priority));
1107 } 1107 }
1108 1108
1109 } // namespace net 1109 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698