| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <iostream> | 6 #include <iostream> |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 | 193 |
| 194 virtual void OnPriority(SpdyStreamId stream_id, | 194 virtual void OnPriority(SpdyStreamId stream_id, |
| 195 SpdyStreamId parent_stream_id, | 195 SpdyStreamId parent_stream_id, |
| 196 uint8 weight, | 196 uint8 weight, |
| 197 bool exclusive) OVERRIDE { | 197 bool exclusive) OVERRIDE { |
| 198 // Do nothing. | 198 // Do nothing. |
| 199 } | 199 } |
| 200 | 200 |
| 201 virtual bool OnUnknownFrame(SpdyStreamId stream_id, | 201 virtual bool OnUnknownFrame(SpdyStreamId stream_id, |
| 202 int frame_type) override { | 202 int frame_type) OVERRIDE { |
| 203 LOG(FATAL); | 203 LOG(FATAL); |
| 204 return false; | 204 return false; |
| 205 } | 205 } |
| 206 | 206 |
| 207 char* ReleaseBuffer() { | 207 char* ReleaseBuffer() { |
| 208 CHECK(finished_); | 208 CHECK(finished_); |
| 209 return buffer_.release(); | 209 return buffer_.release(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 virtual void OnWindowUpdate(SpdyStreamId stream_id, | 212 virtual void OnWindowUpdate(SpdyStreamId stream_id, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 ++altsvc_count_; | 445 ++altsvc_count_; |
| 446 } | 446 } |
| 447 | 447 |
| 448 virtual void OnPriority(SpdyStreamId stream_id, | 448 virtual void OnPriority(SpdyStreamId stream_id, |
| 449 SpdyStreamId parent_stream_id, | 449 SpdyStreamId parent_stream_id, |
| 450 uint8 weight, | 450 uint8 weight, |
| 451 bool exclusive) OVERRIDE { | 451 bool exclusive) OVERRIDE { |
| 452 ++priority_count_; | 452 ++priority_count_; |
| 453 } | 453 } |
| 454 | 454 |
| 455 virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override { | 455 virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) OVERRIDE { |
| 456 DLOG(INFO) << "Unknown frame type " << frame_type; | 456 DLOG(INFO) << "Unknown frame type " << frame_type; |
| 457 return on_unknown_frame_result_; | 457 return on_unknown_frame_result_; |
| 458 } | 458 } |
| 459 | 459 |
| 460 virtual void OnSendCompressedFrame(SpdyStreamId stream_id, | 460 virtual void OnSendCompressedFrame(SpdyStreamId stream_id, |
| 461 SpdyFrameType type, | 461 SpdyFrameType type, |
| 462 size_t payload_len, | 462 size_t payload_len, |
| 463 size_t frame_len) OVERRIDE { | 463 size_t frame_len) OVERRIDE { |
| 464 last_payload_len_ = payload_len; | 464 last_payload_len_ = payload_len; |
| 465 last_frame_len_ = frame_len; | 465 last_frame_len_ = frame_len; |
| (...skipping 5083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5549 TestSpdyVisitor visitor(spdy_version_); | 5549 TestSpdyVisitor visitor(spdy_version_); |
| 5550 visitor.SimulateInFramer(kFrameData, sizeof(kFrameData)); | 5550 visitor.SimulateInFramer(kFrameData, sizeof(kFrameData)); |
| 5551 | 5551 |
| 5552 EXPECT_EQ(SpdyFramer::SPDY_ERROR, visitor.framer_.state()); | 5552 EXPECT_EQ(SpdyFramer::SPDY_ERROR, visitor.framer_.state()); |
| 5553 EXPECT_EQ(SpdyFramer::SPDY_INVALID_CONTROL_FRAME, | 5553 EXPECT_EQ(SpdyFramer::SPDY_INVALID_CONTROL_FRAME, |
| 5554 visitor.framer_.error_code()) | 5554 visitor.framer_.error_code()) |
| 5555 << SpdyFramer::ErrorCodeToString(visitor.framer_.error_code()); | 5555 << SpdyFramer::ErrorCodeToString(visitor.framer_.error_code()); |
| 5556 } | 5556 } |
| 5557 | 5557 |
| 5558 } // namespace net | 5558 } // namespace net |
| OLD | NEW |