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

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

Issue 199843005: Implement padding for SPDY4/HTTP2 DATA frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nullptr => NULL & discard padding at SpdySession visitor call. Created 6 years, 9 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.cc ('k') | no next file » | 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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 1903
1904 void SpdySession::OnStreamFrameData(SpdyStreamId stream_id, 1904 void SpdySession::OnStreamFrameData(SpdyStreamId stream_id,
1905 const char* data, 1905 const char* data,
1906 size_t len, 1906 size_t len,
1907 bool fin) { 1907 bool fin) {
1908 CHECK(in_io_loop_); 1908 CHECK(in_io_loop_);
1909 1909
1910 if (availability_state_ == STATE_CLOSED) 1910 if (availability_state_ == STATE_CLOSED)
1911 return; 1911 return;
1912 1912
1913 if (data == NULL && len != 0) {
1914 // This is notification of consumed data padding.
1915 // TODO(jgraettinger): Properly flow padding into WINDOW_UPDATE frames.
1916 // See crbug.com/353012.
1917 return;
1918 }
1919
1913 DCHECK_LT(len, 1u << 24); 1920 DCHECK_LT(len, 1u << 24);
1914 if (net_log().IsLogging()) { 1921 if (net_log().IsLogging()) {
1915 net_log().AddEvent( 1922 net_log().AddEvent(
1916 NetLog::TYPE_SPDY_SESSION_RECV_DATA, 1923 NetLog::TYPE_SPDY_SESSION_RECV_DATA,
1917 base::Bind(&NetLogSpdyDataCallback, stream_id, len, fin)); 1924 base::Bind(&NetLogSpdyDataCallback, stream_id, len, fin));
1918 } 1925 }
1919 1926
1920 // Build the buffer as early as possible so that we go through the 1927 // Build the buffer as early as possible so that we go through the
1921 // session flow control checks and update 1928 // session flow control checks and update
1922 // |unacked_recv_window_bytes_| properly even when the stream is 1929 // |unacked_recv_window_bytes_| properly even when the stream is
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
3041 if (!queue->empty()) { 3048 if (!queue->empty()) {
3042 SpdyStreamId stream_id = queue->front(); 3049 SpdyStreamId stream_id = queue->front();
3043 queue->pop_front(); 3050 queue->pop_front();
3044 return stream_id; 3051 return stream_id;
3045 } 3052 }
3046 } 3053 }
3047 return 0; 3054 return 0;
3048 } 3055 }
3049 3056
3050 } // namespace net 3057 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_protocol.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698