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

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

Issue 288373004: Add handling + parsing for HTTP/2 ALTSVC frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Non-static initializer fixes. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_protocol.h ('k') | net/spdy/spdy_protocol_test.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_protocol.h" 5 #include "net/spdy/spdy_protocol.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR( 9 SpdyFrameWithNameValueBlockIR::SpdyFrameWithNameValueBlockIR(
10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {} 10 SpdyStreamId stream_id) : SpdyFrameWithFinIR(stream_id) {}
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return PUSH_PROMISE; 107 return PUSH_PROMISE;
108 case 6: 108 case 6:
109 return PING; 109 return PING;
110 case 7: 110 case 7:
111 return GOAWAY; 111 return GOAWAY;
112 case 8: 112 case 8:
113 return WINDOW_UPDATE; 113 return WINDOW_UPDATE;
114 case 9: 114 case 9:
115 return CONTINUATION; 115 return CONTINUATION;
116 case 10: 116 case 10:
117 return ALTSVC;
118 case 11:
117 return BLOCKED; 119 return BLOCKED;
118 } 120 }
119 break; 121 break;
120 } 122 }
121 123
122 LOG(DFATAL) << "Unhandled frame type " << frame_type_field; 124 LOG(DFATAL) << "Unhandled frame type " << frame_type_field;
123 return DATA; 125 return DATA;
124 } 126 }
125 127
126 int SpdyConstants::SerializeFrameType(SpdyMajorVersion version, 128 int SpdyConstants::SerializeFrameType(SpdyMajorVersion version,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 case PUSH_PROMISE: 166 case PUSH_PROMISE:
165 return 5; 167 return 5;
166 case PING: 168 case PING:
167 return 6; 169 return 6;
168 case GOAWAY: 170 case GOAWAY:
169 return 7; 171 return 7;
170 case WINDOW_UPDATE: 172 case WINDOW_UPDATE:
171 return 8; 173 return 8;
172 case CONTINUATION: 174 case CONTINUATION:
173 return 9; 175 return 9;
176 case ALTSVC:
177 return 10;
174 case BLOCKED: 178 case BLOCKED:
175 return 10; 179 return 11;
176 default: 180 default:
177 LOG(DFATAL) << "Serializing unhandled frame type " << frame_type; 181 LOG(DFATAL) << "Serializing unhandled frame type " << frame_type;
178 return -1; 182 return -1;
179 } 183 }
180 } 184 }
181 185
182 LOG(DFATAL) << "Unhandled SPDY version " << version; 186 LOG(DFATAL) << "Unhandled SPDY version " << version;
183 return -1; 187 return -1;
184 } 188 }
185 189
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 } 785 }
782 786
783 void SpdyPushPromiseIR::Visit(SpdyFrameVisitor* visitor) const { 787 void SpdyPushPromiseIR::Visit(SpdyFrameVisitor* visitor) const {
784 return visitor->VisitPushPromise(*this); 788 return visitor->VisitPushPromise(*this);
785 } 789 }
786 790
787 void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const { 791 void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const {
788 return visitor->VisitContinuation(*this); 792 return visitor->VisitContinuation(*this);
789 } 793 }
790 794
795 SpdyAltSvcIR::SpdyAltSvcIR(SpdyStreamId stream_id)
796 : SpdyFrameWithStreamIdIR(stream_id),
797 max_age_(0),
798 port_(0) {}
799
800 void SpdyAltSvcIR::Visit(SpdyFrameVisitor* visitor) const {
801 return visitor->VisitAltSvc(*this);
802 }
803
791 } // namespace net 804 } // namespace net
OLDNEW
« 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