| 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/buffered_spdy_framer.h" | 5 #include "net/spdy/buffered_spdy_framer.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 SpdyPriority priority, | 222 SpdyPriority priority, |
| 223 uint8 credential_slot, | 223 uint8 credential_slot, |
| 224 SpdyControlFlags flags, | 224 SpdyControlFlags flags, |
| 225 bool compressed, | 225 bool compressed, |
| 226 const SpdyHeaderBlock* headers) { | 226 const SpdyHeaderBlock* headers) { |
| 227 return spdy_framer_.CreateSynStream(stream_id, associated_stream_id, priority, | 227 return spdy_framer_.CreateSynStream(stream_id, associated_stream_id, priority, |
| 228 credential_slot, flags, compressed, | 228 credential_slot, flags, compressed, |
| 229 headers); | 229 headers); |
| 230 } | 230 } |
| 231 | 231 |
| 232 SpdySynReplyControlFrame* BufferedSpdyFramer::CreateSynReply( | 232 SpdyFrame* BufferedSpdyFramer::CreateSynReply( |
| 233 SpdyStreamId stream_id, | 233 SpdyStreamId stream_id, |
| 234 SpdyControlFlags flags, | 234 SpdyControlFlags flags, |
| 235 bool compressed, | 235 bool compressed, |
| 236 const SpdyHeaderBlock* headers) { | 236 const SpdyHeaderBlock* headers) { |
| 237 return spdy_framer_.CreateSynReply(stream_id, flags, compressed, headers); | 237 return spdy_framer_.CreateSynReply(stream_id, flags, compressed, headers); |
| 238 } | 238 } |
| 239 | 239 |
| 240 SpdyRstStreamControlFrame* BufferedSpdyFramer::CreateRstStream( | 240 SpdyRstStreamControlFrame* BufferedSpdyFramer::CreateRstStream( |
| 241 SpdyStreamId stream_id, | 241 SpdyStreamId stream_id, |
| 242 SpdyRstStreamStatus status) const { | 242 SpdyRstStreamStatus status) const { |
| 243 return spdy_framer_.CreateRstStream(stream_id, status); | 243 return spdy_framer_.CreateRstStream(stream_id, status); |
| 244 } | 244 } |
| 245 | 245 |
| 246 SpdySettingsControlFrame* BufferedSpdyFramer::CreateSettings( | 246 SpdySettingsControlFrame* BufferedSpdyFramer::CreateSettings( |
| 247 const SettingsMap& values) const { | 247 const SettingsMap& values) const { |
| 248 return spdy_framer_.CreateSettings(values); | 248 return spdy_framer_.CreateSettings(values); |
| 249 } | 249 } |
| 250 | 250 |
| 251 SpdyPingControlFrame* BufferedSpdyFramer::CreatePingFrame( | 251 SpdyPingControlFrame* BufferedSpdyFramer::CreatePingFrame( |
| 252 uint32 unique_id) const { | 252 uint32 unique_id) const { |
| 253 return spdy_framer_.CreatePingFrame(unique_id); | 253 return spdy_framer_.CreatePingFrame(unique_id); |
| 254 } | 254 } |
| 255 | 255 |
| 256 SpdyGoAwayControlFrame* BufferedSpdyFramer::CreateGoAway( | 256 SpdyFrame* BufferedSpdyFramer::CreateGoAway( |
| 257 SpdyStreamId last_accepted_stream_id, | 257 SpdyStreamId last_accepted_stream_id, |
| 258 SpdyGoAwayStatus status) const { | 258 SpdyGoAwayStatus status) const { |
| 259 return spdy_framer_.CreateGoAway(last_accepted_stream_id, status); | 259 return spdy_framer_.CreateGoAway(last_accepted_stream_id, status); |
| 260 } | 260 } |
| 261 | 261 |
| 262 SpdyHeadersControlFrame* BufferedSpdyFramer::CreateHeaders( | 262 SpdyHeadersControlFrame* BufferedSpdyFramer::CreateHeaders( |
| 263 SpdyStreamId stream_id, | 263 SpdyStreamId stream_id, |
| 264 SpdyControlFlags flags, | 264 SpdyControlFlags flags, |
| 265 bool compressed, | 265 bool compressed, |
| 266 const SpdyHeaderBlock* headers) { | 266 const SpdyHeaderBlock* headers) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 295 | 295 |
| 296 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { | 296 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { |
| 297 memset(header_buffer_, 0, kHeaderBufferSize); | 297 memset(header_buffer_, 0, kHeaderBufferSize); |
| 298 header_buffer_used_ = 0; | 298 header_buffer_used_ = 0; |
| 299 header_buffer_valid_ = true; | 299 header_buffer_valid_ = true; |
| 300 header_stream_id_ = stream_id; | 300 header_stream_id_ = stream_id; |
| 301 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); | 301 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); |
| 302 } | 302 } |
| 303 | 303 |
| 304 } // namespace net | 304 } // namespace net |
| OLD | NEW |