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

Unified Diff: net/spdy/spdy_session.cc

Issue 1561203003: Remove SPDY/2 code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #3. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_protocol_test.cc ('k') | net/spdy/spdy_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index a2fec98d21edd9a6411975b372c9a9aad7e7fb9c..64a7f624a4e52b8ca078f7b7b417654793d4de25 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -465,15 +465,11 @@ void SplitPushedHeadersToRequestAndResponse(const SpdyHeaderBlock& headers,
it != headers.end();
++it) {
SpdyHeaderBlock* to_insert = response_headers;
- if (protocol_version == SPDY2) {
- if (it->first == "url")
- to_insert = request_headers;
- } else {
- const char* host = protocol_version >= HTTP2 ? ":authority" : ":host";
- static const char scheme[] = ":scheme";
- static const char path[] = ":path";
- if (it->first == host || it->first == scheme || it->first == path)
- to_insert = request_headers;
+ const char* host = protocol_version >= HTTP2 ? ":authority" : ":host";
+ static const char scheme[] = ":scheme";
+ static const char path[] = ":path";
+ if (it->first == host || it->first == scheme || it->first == path) {
+ to_insert = request_headers;
}
to_insert->insert(*it);
}
@@ -767,10 +763,8 @@ void SpdySession::InitializeWithSocket(
flow_control_state_ = FLOW_CONTROL_STREAM_AND_SESSION;
session_send_window_size_ = GetDefaultInitialWindowSize(protocol_);
session_recv_window_size_ = GetDefaultInitialWindowSize(protocol_);
- } else if (protocol_ >= kProtoSPDY3) {
- flow_control_state_ = FLOW_CONTROL_STREAM;
} else {
- flow_control_state_ = FLOW_CONTROL_NONE;
+ flow_control_state_ = FLOW_CONTROL_STREAM;
}
buffered_spdy_framer_.reset(
@@ -2640,20 +2634,17 @@ bool SpdySession::TryCreatePushStream(SpdyStreamId stream_id,
// Server-initiated streams should have even sequence numbers.
if ((stream_id & 0x1) != 0) {
LOG(WARNING) << "Received invalid push stream id " << stream_id;
- if (GetProtocolVersion() > SPDY2)
- CloseSessionOnError(ERR_SPDY_PROTOCOL_ERROR, "Odd push stream id.");
+ CloseSessionOnError(ERR_SPDY_PROTOCOL_ERROR, "Odd push stream id.");
return false;
}
- if (GetProtocolVersion() > SPDY2) {
- if (stream_id <= last_accepted_push_stream_id_) {
- LOG(WARNING) << "Received push stream id lesser or equal to the last "
- << "accepted before " << stream_id;
- CloseSessionOnError(
- ERR_SPDY_PROTOCOL_ERROR,
- "New push stream id must be greater than the last accepted.");
- return false;
- }
+ if (stream_id <= last_accepted_push_stream_id_) {
+ LOG(WARNING) << "Received push stream id lesser or equal to the last "
+ << "accepted before " << stream_id;
+ CloseSessionOnError(
+ ERR_SPDY_PROTOCOL_ERROR,
+ "New push stream id must be greater than the last accepted.");
+ return false;
}
if (IsStreamActive(stream_id)) {
« no previous file with comments | « net/spdy/spdy_protocol_test.cc ('k') | net/spdy/spdy_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698