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

Unified Diff: net/spdy/spdy_protocol.cc

Issue 290003006: Land recent SPDY changes (through 67282679) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on nullptr => NULL Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | net/spdy/spdy_protocol_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_protocol.cc
diff --git a/net/spdy/spdy_protocol.cc b/net/spdy/spdy_protocol.cc
index 78b4f392a69ccdbd40a02febc0beee4bd4562f7c..808ab1c4eee69446e63180f9c7b28027193211ed 100644
--- a/net/spdy/spdy_protocol.cc
+++ b/net/spdy/spdy_protocol.cc
@@ -98,7 +98,8 @@ SpdyFrameType SpdyConstants::ParseFrameType(SpdyMajorVersion version,
return DATA;
case 1:
return HEADERS;
- // TODO(hkhalil): Add PRIORITY.
+ case 2:
+ return PRIORITY;
case 3:
return RST_STREAM;
case 4:
@@ -114,6 +115,8 @@ SpdyFrameType SpdyConstants::ParseFrameType(SpdyMajorVersion version,
case 9:
return CONTINUATION;
case 10:
+ return ALTSVC;
+ case 11:
return BLOCKED;
}
break;
@@ -156,7 +159,8 @@ int SpdyConstants::SerializeFrameType(SpdyMajorVersion version,
return 0;
case HEADERS:
return 1;
- // TODO(hkhalil): Add PRIORITY.
+ case PRIORITY:
+ return 2;
case RST_STREAM:
return 3;
case SETTINGS:
@@ -171,8 +175,10 @@ int SpdyConstants::SerializeFrameType(SpdyMajorVersion version,
return 8;
case CONTINUATION:
return 9;
- case BLOCKED:
+ case ALTSVC:
return 10;
+ case BLOCKED:
+ return 11;
default:
LOG(DFATAL) << "Serializing unhandled frame type " << frame_type;
return -1;
@@ -209,9 +215,9 @@ bool SpdyConstants::IsValidSettingId(SpdyMajorVersion version,
return false;
}
- // INITIAL_WINDOW_SIZE is the last valid setting id.
+ // COMPRESS_DATA is the last valid setting id.
if (setting_id_field >
- SerializeSettingId(version, SETTINGS_INITIAL_WINDOW_SIZE)) {
+ SerializeSettingId(version, SETTINGS_COMPRESS_DATA)) {
return false;
}
@@ -255,6 +261,8 @@ SpdySettingsIds SpdyConstants::ParseSettingId(SpdyMajorVersion version,
return SETTINGS_MAX_CONCURRENT_STREAMS;
case 4:
return SETTINGS_INITIAL_WINDOW_SIZE;
+ case 5:
+ return SETTINGS_COMPRESS_DATA;
}
break;
}
@@ -298,6 +306,8 @@ int SpdyConstants::SerializeSettingId(SpdyMajorVersion version,
return 3;
case SETTINGS_INITIAL_WINDOW_SIZE:
return 4;
+ case SETTINGS_COMPRESS_DATA:
+ return 5;
default:
LOG(DFATAL) << "Serializing unhandled setting id " << id;
return -1;
@@ -788,4 +798,13 @@ void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const {
return visitor->VisitContinuation(*this);
}
+SpdyAltSvcIR::SpdyAltSvcIR(SpdyStreamId stream_id)
+ : SpdyFrameWithStreamIdIR(stream_id),
+ max_age_(0),
+ port_(0) {}
+
+void SpdyAltSvcIR::Visit(SpdyFrameVisitor* visitor) const {
+ return visitor->VisitAltSvc(*this);
+}
+
} // namespace net
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | net/spdy/spdy_protocol_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698