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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 fin_flag_count_(0), | 259 fin_flag_count_(0), |
260 zero_length_data_frame_count_(0), | 260 zero_length_data_frame_count_(0), |
261 control_frame_header_data_count_(0), | 261 control_frame_header_data_count_(0), |
262 zero_length_control_frame_header_data_count_(0), | 262 zero_length_control_frame_header_data_count_(0), |
263 data_frame_count_(0), | 263 data_frame_count_(0), |
264 last_payload_len_(0), | 264 last_payload_len_(0), |
265 last_frame_len_(0), | 265 last_frame_len_(0), |
266 header_buffer_(new char[kDefaultHeaderBufferSize]), | 266 header_buffer_(new char[kDefaultHeaderBufferSize]), |
267 header_buffer_length_(0), | 267 header_buffer_length_(0), |
268 header_buffer_size_(kDefaultHeaderBufferSize), | 268 header_buffer_size_(kDefaultHeaderBufferSize), |
269 header_stream_id_(-1), | 269 header_stream_id_(static_cast<SpdyStreamId>(-1)), |
270 header_control_type_(DATA), | 270 header_control_type_(DATA), |
271 header_buffer_valid_(false) {} | 271 header_buffer_valid_(false) {} |
272 | 272 |
273 virtual void OnError(SpdyFramer* f) OVERRIDE { | 273 virtual void OnError(SpdyFramer* f) OVERRIDE { |
274 LOG(INFO) << "SpdyFramer Error: " | 274 LOG(INFO) << "SpdyFramer Error: " |
275 << SpdyFramer::ErrorCodeToString(f->error_code()); | 275 << SpdyFramer::ErrorCodeToString(f->error_code()); |
276 ++error_count_; | 276 ++error_count_; |
277 } | 277 } |
278 | 278 |
279 virtual void OnDataFrameHeader(SpdyStreamId stream_id, | 279 virtual void OnDataFrameHeader(SpdyStreamId stream_id, |
(...skipping 5082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5362 EXPECT_EQ(4u, framer.MapWeightToPriority(109)); | 5362 EXPECT_EQ(4u, framer.MapWeightToPriority(109)); |
5363 EXPECT_EQ(4u, framer.MapWeightToPriority(74)); | 5363 EXPECT_EQ(4u, framer.MapWeightToPriority(74)); |
5364 EXPECT_EQ(5u, framer.MapWeightToPriority(73)); | 5364 EXPECT_EQ(5u, framer.MapWeightToPriority(73)); |
5365 EXPECT_EQ(5u, framer.MapWeightToPriority(37)); | 5365 EXPECT_EQ(5u, framer.MapWeightToPriority(37)); |
5366 EXPECT_EQ(6u, framer.MapWeightToPriority(36)); | 5366 EXPECT_EQ(6u, framer.MapWeightToPriority(36)); |
5367 EXPECT_EQ(6u, framer.MapWeightToPriority(1)); | 5367 EXPECT_EQ(6u, framer.MapWeightToPriority(1)); |
5368 EXPECT_EQ(7u, framer.MapWeightToPriority(0)); | 5368 EXPECT_EQ(7u, framer.MapWeightToPriority(0)); |
5369 } | 5369 } |
5370 | 5370 |
5371 } // namespace net | 5371 } // namespace net |
OLD | NEW |