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

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

Issue 485833002: HTTP2 draft 14 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ignore_result(). Created 6 years, 4 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_session_unittest.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 <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 headers, response_time, recv_first_byte_time, stream)); 2314 headers, response_time, recv_first_byte_time, stream));
2315 } else { 2315 } else {
2316 int rv = stream->OnAdditionalResponseHeadersReceived(headers); 2316 int rv = stream->OnAdditionalResponseHeadersReceived(headers);
2317 if (rv < 0) { 2317 if (rv < 0) {
2318 DCHECK_NE(rv, ERR_IO_PENDING); 2318 DCHECK_NE(rv, ERR_IO_PENDING);
2319 DCHECK(active_streams_.find(stream_id) == active_streams_.end()); 2319 DCHECK(active_streams_.find(stream_id) == active_streams_.end());
2320 } 2320 }
2321 } 2321 }
2322 } 2322 }
2323 2323
2324 bool SpdySession::OnUnknownFrame(SpdyStreamId stream_id, int frame_type) {
2325 // Validate stream id.
2326 // Was the frame sent on a stream id that has not been used in this session?
2327 if (stream_id % 2 == 1 && stream_id > stream_hi_water_mark_)
2328 return false;
2329 // TODO(bnc): Track highest id for server initiated streams.
2330 return true;
2331 }
2332
2324 void SpdySession::OnRstStream(SpdyStreamId stream_id, 2333 void SpdySession::OnRstStream(SpdyStreamId stream_id,
2325 SpdyRstStreamStatus status) { 2334 SpdyRstStreamStatus status) {
2326 CHECK(in_io_loop_); 2335 CHECK(in_io_loop_);
2327 2336
2328 std::string description; 2337 std::string description;
2329 net_log().AddEvent( 2338 net_log().AddEvent(
2330 NetLog::TYPE_SPDY_SESSION_RST_STREAM, 2339 NetLog::TYPE_SPDY_SESSION_RST_STREAM,
2331 base::Bind(&NetLogSpdyRstCallback, 2340 base::Bind(&NetLogSpdyRstCallback,
2332 stream_id, status, &description)); 2341 stream_id, status, &description));
2333 2342
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 if (!queue->empty()) { 3173 if (!queue->empty()) {
3165 SpdyStreamId stream_id = queue->front(); 3174 SpdyStreamId stream_id = queue->front();
3166 queue->pop_front(); 3175 queue->pop_front();
3167 return stream_id; 3176 return stream_id;
3168 } 3177 }
3169 } 3178 }
3170 return 0; 3179 return 0;
3171 } 3180 }
3172 3181
3173 } // namespace net 3182 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.h ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698