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

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

Issue 1961573002: Avoids the "re-encode HPACK as SPDY3" step. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update new test Created 4 years, 7 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_session.h ('k') | net/spdy/spdy_test_util_common.cc » ('j') | 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_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 case SpdyFramer::SPDY_RST_STREAM_FRAME_CORRUPT: 354 case SpdyFramer::SPDY_RST_STREAM_FRAME_CORRUPT:
355 return SPDY_ERROR_RST_STREAM_FRAME_CORRUPT; 355 return SPDY_ERROR_RST_STREAM_FRAME_CORRUPT;
356 case SpdyFramer::SPDY_INVALID_PADDING: 356 case SpdyFramer::SPDY_INVALID_PADDING:
357 return SPDY_ERROR_INVALID_PADDING; 357 return SPDY_ERROR_INVALID_PADDING;
358 case SpdyFramer::SPDY_INVALID_DATA_FRAME_FLAGS: 358 case SpdyFramer::SPDY_INVALID_DATA_FRAME_FLAGS:
359 return SPDY_ERROR_INVALID_DATA_FRAME_FLAGS; 359 return SPDY_ERROR_INVALID_DATA_FRAME_FLAGS;
360 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_FLAGS: 360 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_FLAGS:
361 return SPDY_ERROR_INVALID_CONTROL_FRAME_FLAGS; 361 return SPDY_ERROR_INVALID_CONTROL_FRAME_FLAGS;
362 case SpdyFramer::SPDY_UNEXPECTED_FRAME: 362 case SpdyFramer::SPDY_UNEXPECTED_FRAME:
363 return SPDY_ERROR_UNEXPECTED_FRAME; 363 return SPDY_ERROR_UNEXPECTED_FRAME;
364 case SpdyFramer::SPDY_INTERNAL_FRAMER_ERROR:
365 return SPDY_ERROR_INTERNAL_FRAMER_ERROR;
364 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_SIZE: 366 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_SIZE:
365 return SPDY_ERROR_INVALID_CONTROL_FRAME_SIZE; 367 return SPDY_ERROR_INVALID_CONTROL_FRAME_SIZE;
366 case SpdyFramer::SPDY_INVALID_STREAM_ID: 368 case SpdyFramer::SPDY_INVALID_STREAM_ID:
367 return SPDY_ERROR_INVALID_STREAM_ID; 369 return SPDY_ERROR_INVALID_STREAM_ID;
368 default: 370 default:
369 NOTREACHED(); 371 NOTREACHED();
370 return static_cast<SpdyProtocolErrorDetails>(-1); 372 return static_cast<SpdyProtocolErrorDetails>(-1);
371 } 373 }
372 } 374 }
373 375
(...skipping 18 matching lines...) Expand all
392 case SpdyFramer::SPDY_RST_STREAM_FRAME_CORRUPT: 394 case SpdyFramer::SPDY_RST_STREAM_FRAME_CORRUPT:
393 return ERR_SPDY_PROTOCOL_ERROR; 395 return ERR_SPDY_PROTOCOL_ERROR;
394 case SpdyFramer::SPDY_INVALID_PADDING: 396 case SpdyFramer::SPDY_INVALID_PADDING:
395 return ERR_SPDY_PROTOCOL_ERROR; 397 return ERR_SPDY_PROTOCOL_ERROR;
396 case SpdyFramer::SPDY_INVALID_DATA_FRAME_FLAGS: 398 case SpdyFramer::SPDY_INVALID_DATA_FRAME_FLAGS:
397 return ERR_SPDY_PROTOCOL_ERROR; 399 return ERR_SPDY_PROTOCOL_ERROR;
398 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_FLAGS: 400 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_FLAGS:
399 return ERR_SPDY_PROTOCOL_ERROR; 401 return ERR_SPDY_PROTOCOL_ERROR;
400 case SpdyFramer::SPDY_UNEXPECTED_FRAME: 402 case SpdyFramer::SPDY_UNEXPECTED_FRAME:
401 return ERR_SPDY_PROTOCOL_ERROR; 403 return ERR_SPDY_PROTOCOL_ERROR;
404 case SpdyFramer::SPDY_INTERNAL_FRAMER_ERROR:
405 return ERR_SPDY_PROTOCOL_ERROR;
402 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_SIZE: 406 case SpdyFramer::SPDY_INVALID_CONTROL_FRAME_SIZE:
403 return ERR_SPDY_FRAME_SIZE_ERROR; 407 return ERR_SPDY_FRAME_SIZE_ERROR;
404 case SpdyFramer::SPDY_INVALID_STREAM_ID: 408 case SpdyFramer::SPDY_INVALID_STREAM_ID:
405 return ERR_SPDY_PROTOCOL_ERROR; 409 return ERR_SPDY_PROTOCOL_ERROR;
406 default: 410 default:
407 NOTREACHED(); 411 NOTREACHED();
408 return ERR_SPDY_PROTOCOL_ERROR; 412 return ERR_SPDY_PROTOCOL_ERROR;
409 } 413 }
410 } 414 }
411 415
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 // |session_recv_window_size_| does not change. 2204 // |session_recv_window_size_| does not change.
2201 DecreaseRecvWindowSize(static_cast<int32_t>(len)); 2205 DecreaseRecvWindowSize(static_cast<int32_t>(len));
2202 IncreaseRecvWindowSize(static_cast<int32_t>(len)); 2206 IncreaseRecvWindowSize(static_cast<int32_t>(len));
2203 2207
2204 ActiveStreamMap::iterator it = active_streams_.find(stream_id); 2208 ActiveStreamMap::iterator it = active_streams_.find(stream_id);
2205 if (it == active_streams_.end()) 2209 if (it == active_streams_.end())
2206 return; 2210 return;
2207 it->second.stream->OnPaddingConsumed(len); 2211 it->second.stream->OnPaddingConsumed(len);
2208 } 2212 }
2209 2213
2210 SpdyHeadersHandlerInterface* SpdySession::OnHeaderFrameStart(
2211 SpdyStreamId stream_id) {
2212 LOG(FATAL);
2213 return nullptr;
2214 }
2215
2216 void SpdySession::OnHeaderFrameEnd(SpdyStreamId stream_id, bool end_headers) {
2217 LOG(FATAL);
2218 }
2219
2220 void SpdySession::OnSettings(bool clear_persisted) { 2214 void SpdySession::OnSettings(bool clear_persisted) {
2221 CHECK(in_io_loop_); 2215 CHECK(in_io_loop_);
2222 2216
2223 if (clear_persisted) 2217 if (clear_persisted)
2224 http_server_properties_->ClearSpdySettings(GetServer()); 2218 http_server_properties_->ClearSpdySettings(GetServer());
2225 2219
2226 if (net_log_.IsCapturing()) { 2220 if (net_log_.IsCapturing()) {
2227 net_log_.AddEvent(NetLog::TYPE_HTTP2_SESSION_RECV_SETTINGS, 2221 net_log_.AddEvent(NetLog::TYPE_HTTP2_SESSION_RECV_SETTINGS,
2228 base::Bind(&NetLogSpdySettingsCallback, host_port_pair(), 2222 base::Bind(&NetLogSpdySettingsCallback, host_port_pair(),
2229 clear_persisted)); 2223 clear_persisted));
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3346 if (!queue->empty()) { 3340 if (!queue->empty()) {
3347 SpdyStreamId stream_id = queue->front(); 3341 SpdyStreamId stream_id = queue->front();
3348 queue->pop_front(); 3342 queue->pop_front();
3349 return stream_id; 3343 return stream_id;
3350 } 3344 }
3351 } 3345 }
3352 return 0; 3346 return 0;
3353 } 3347 }
3354 3348
3355 } // namespace net 3349 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698