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

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

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