| 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 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 frames_received_++; | 319 frames_received_++; |
| 320 DCHECK(!control_frame_fields_.get()); | 320 DCHECK(!control_frame_fields_.get()); |
| 321 control_frame_fields_.reset(new ControlFrameFields()); | 321 control_frame_fields_.reset(new ControlFrameFields()); |
| 322 control_frame_fields_->type = PUSH_PROMISE; | 322 control_frame_fields_->type = PUSH_PROMISE; |
| 323 control_frame_fields_->stream_id = stream_id; | 323 control_frame_fields_->stream_id = stream_id; |
| 324 control_frame_fields_->promised_stream_id = promised_stream_id; | 324 control_frame_fields_->promised_stream_id = promised_stream_id; |
| 325 | 325 |
| 326 InitHeaderStreaming(stream_id); | 326 InitHeaderStreaming(stream_id); |
| 327 } | 327 } |
| 328 | 328 |
| 329 void BufferedSpdyFramer::OnAltSvc( |
| 330 SpdyStreamId stream_id, |
| 331 base::StringPiece origin, |
| 332 const SpdyAltSvcWireFormat::AlternativeServiceVector& altsvc_vector) { |
| 333 visitor_->OnAltSvc(stream_id, origin, altsvc_vector); |
| 334 } |
| 335 |
| 329 void BufferedSpdyFramer::OnContinuation(SpdyStreamId stream_id, bool end) { | 336 void BufferedSpdyFramer::OnContinuation(SpdyStreamId stream_id, bool end) { |
| 330 } | 337 } |
| 331 | 338 |
| 332 bool BufferedSpdyFramer::OnUnknownFrame(SpdyStreamId stream_id, | 339 bool BufferedSpdyFramer::OnUnknownFrame(SpdyStreamId stream_id, |
| 333 int frame_type) { | 340 int frame_type) { |
| 334 return visitor_->OnUnknownFrame(stream_id, frame_type); | 341 return visitor_->OnUnknownFrame(stream_id, frame_type); |
| 335 } | 342 } |
| 336 | 343 |
| 337 SpdyMajorVersion BufferedSpdyFramer::protocol_version() { | 344 SpdyMajorVersion BufferedSpdyFramer::protocol_version() { |
| 338 return spdy_framer_.protocol_version(); | 345 return spdy_framer_.protocol_version(); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 } | 495 } |
| 489 | 496 |
| 490 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { | 497 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { |
| 491 header_buffer_.clear(); | 498 header_buffer_.clear(); |
| 492 header_buffer_valid_ = true; | 499 header_buffer_valid_ = true; |
| 493 header_stream_id_ = stream_id; | 500 header_stream_id_ = stream_id; |
| 494 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); | 501 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); |
| 495 } | 502 } |
| 496 | 503 |
| 497 } // namespace net | 504 } // namespace net |
| OLD | NEW |