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

Side by Side Diff: net/quic/core/quic_spdy_session.cc

Issue 2675593002: Spdy{RstStream,GoAway}Status -> SpdyErrorCode. (Closed)
Patch Set: Unsigned vs signed int Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/quic/core/quic_spdy_session.h" 5 #include "net/quic/core/quic_spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdint> 8 #include <cstdint>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 void OnDataFrameHeader(SpdyStreamId stream_id, 146 void OnDataFrameHeader(SpdyStreamId stream_id,
147 size_t length, 147 size_t length,
148 bool fin) override { 148 bool fin) override {
149 if (session_->OnDataFrameHeader(stream_id, length, fin)) { 149 if (session_->OnDataFrameHeader(stream_id, length, fin)) {
150 return; 150 return;
151 } 151 }
152 CloseConnection("SPDY DATA frame received."); 152 CloseConnection("SPDY DATA frame received.");
153 } 153 }
154 154
155 void OnRstStream(SpdyStreamId stream_id, 155 void OnRstStream(SpdyStreamId stream_id, SpdyErrorCode error_code) override {
156 SpdyRstStreamStatus status) override {
157 CloseConnection("SPDY RST_STREAM frame received."); 156 CloseConnection("SPDY RST_STREAM frame received.");
158 } 157 }
159 158
160 void OnSetting(SpdySettingsIds id, uint32_t value) override { 159 void OnSetting(SpdySettingsIds id, uint32_t value) override {
161 if (!FLAGS_quic_reloadable_flag_quic_respect_http2_settings_frame) { 160 if (!FLAGS_quic_reloadable_flag_quic_respect_http2_settings_frame) {
162 CloseConnection("SPDY SETTINGS frame received."); 161 CloseConnection("SPDY SETTINGS frame received.");
163 return; 162 return;
164 } 163 }
165 switch (id) { 164 switch (id) {
166 case SETTINGS_HEADER_TABLE_SIZE: 165 case SETTINGS_HEADER_TABLE_SIZE:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (!FLAGS_quic_reloadable_flag_quic_respect_http2_settings_frame) { 203 if (!FLAGS_quic_reloadable_flag_quic_respect_http2_settings_frame) {
205 CloseConnection("SPDY SETTINGS frame received."); 204 CloseConnection("SPDY SETTINGS frame received.");
206 } 205 }
207 } 206 }
208 207
209 void OnPing(SpdyPingId unique_id, bool is_ack) override { 208 void OnPing(SpdyPingId unique_id, bool is_ack) override {
210 CloseConnection("SPDY PING frame received."); 209 CloseConnection("SPDY PING frame received.");
211 } 210 }
212 211
213 void OnGoAway(SpdyStreamId last_accepted_stream_id, 212 void OnGoAway(SpdyStreamId last_accepted_stream_id,
214 SpdyGoAwayStatus status) override { 213 SpdyErrorCode error_code) override {
215 CloseConnection("SPDY GOAWAY frame received."); 214 CloseConnection("SPDY GOAWAY frame received.");
216 } 215 }
217 216
218 void OnHeaders(SpdyStreamId stream_id, 217 void OnHeaders(SpdyStreamId stream_id,
219 bool has_priority, 218 bool has_priority,
220 int weight, 219 int weight,
221 SpdyStreamId /*parent_stream_id*/, 220 SpdyStreamId /*parent_stream_id*/,
222 bool /*exclusive*/, 221 bool /*exclusive*/,
223 bool fin, 222 bool fin,
224 bool end) override { 223 bool end) override {
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 set_max_uncompressed_header_bytes); 740 set_max_uncompressed_header_bytes);
742 } 741 }
743 742
744 void QuicSpdySession::CloseConnectionWithDetails(QuicErrorCode error, 743 void QuicSpdySession::CloseConnectionWithDetails(QuicErrorCode error,
745 const string& details) { 744 const string& details) {
746 connection()->CloseConnection( 745 connection()->CloseConnection(
747 error, details, ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); 746 error, details, ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
748 } 747 }
749 748
750 } // namespace net 749 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698