| OLD | NEW |
| 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 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1905 | 1905 |
| 1906 void SpdySession::OnStreamFrameData(SpdyStreamId stream_id, | 1906 void SpdySession::OnStreamFrameData(SpdyStreamId stream_id, |
| 1907 const char* data, | 1907 const char* data, |
| 1908 size_t len, | 1908 size_t len, |
| 1909 bool fin) { | 1909 bool fin) { |
| 1910 CHECK(in_io_loop_); | 1910 CHECK(in_io_loop_); |
| 1911 | 1911 |
| 1912 if (availability_state_ == STATE_CLOSED) | 1912 if (availability_state_ == STATE_CLOSED) |
| 1913 return; | 1913 return; |
| 1914 | 1914 |
| 1915 if (data == NULL && len != 0) { |
| 1916 // This is notification of consumed data padding. |
| 1917 // TODO(jgraettinger): Properly flow padding into WINDOW_UPDATE frames. |
| 1918 // See crbug.com/353012. |
| 1919 return; |
| 1920 } |
| 1921 |
| 1915 DCHECK_LT(len, 1u << 24); | 1922 DCHECK_LT(len, 1u << 24); |
| 1916 if (net_log().IsLogging()) { | 1923 if (net_log().IsLogging()) { |
| 1917 net_log().AddEvent( | 1924 net_log().AddEvent( |
| 1918 NetLog::TYPE_SPDY_SESSION_RECV_DATA, | 1925 NetLog::TYPE_SPDY_SESSION_RECV_DATA, |
| 1919 base::Bind(&NetLogSpdyDataCallback, stream_id, len, fin)); | 1926 base::Bind(&NetLogSpdyDataCallback, stream_id, len, fin)); |
| 1920 } | 1927 } |
| 1921 | 1928 |
| 1922 // Build the buffer as early as possible so that we go through the | 1929 // Build the buffer as early as possible so that we go through the |
| 1923 // session flow control checks and update | 1930 // session flow control checks and update |
| 1924 // |unacked_recv_window_bytes_| properly even when the stream is | 1931 // |unacked_recv_window_bytes_| properly even when the stream is |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3043 if (!queue->empty()) { | 3050 if (!queue->empty()) { |
| 3044 SpdyStreamId stream_id = queue->front(); | 3051 SpdyStreamId stream_id = queue->front(); |
| 3045 queue->pop_front(); | 3052 queue->pop_front(); |
| 3046 return stream_id; | 3053 return stream_id; |
| 3047 } | 3054 } |
| 3048 } | 3055 } |
| 3049 return 0; | 3056 return 0; |
| 3050 } | 3057 } |
| 3051 | 3058 |
| 3052 } // namespace net | 3059 } // namespace net |
| OLD | NEW |