| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/core/hpack/hpack_encoder.h" | 5 #include "net/spdy/core/hpack/hpack_encoder.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/ptr_util.h" | |
| 12 #include "net/spdy/core/hpack/hpack_constants.h" | 11 #include "net/spdy/core/hpack/hpack_constants.h" |
| 13 #include "net/spdy/core/hpack/hpack_header_table.h" | 12 #include "net/spdy/core/hpack/hpack_header_table.h" |
| 14 #include "net/spdy/core/hpack/hpack_huffman_table.h" | 13 #include "net/spdy/core/hpack/hpack_huffman_table.h" |
| 15 #include "net/spdy/core/hpack/hpack_output_stream.h" | 14 #include "net/spdy/core/hpack/hpack_output_stream.h" |
| 16 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" | 15 #include "net/spdy/platform/api/spdy_estimate_memory_usage.h" |
| 17 #include "net/spdy/platform/api/spdy_ptr_util.h" | 16 #include "net/spdy/platform/api/spdy_ptr_util.h" |
| 18 | 17 |
| 19 namespace net { | 18 namespace net { |
| 20 | 19 |
| 21 class HpackEncoder::RepresentationIterator { | 20 class HpackEncoder::RepresentationIterator { |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 has_next_ = encoder_->output_stream_.size() > max_encoded_bytes; | 362 has_next_ = encoder_->output_stream_.size() > max_encoded_bytes; |
| 364 encoder_->output_stream_.BoundedTakeString(max_encoded_bytes, output); | 363 encoder_->output_stream_.BoundedTakeString(max_encoded_bytes, output); |
| 365 } | 364 } |
| 366 | 365 |
| 367 std::unique_ptr<HpackEncoder::ProgressiveEncoder> HpackEncoder::EncodeHeaderSet( | 366 std::unique_ptr<HpackEncoder::ProgressiveEncoder> HpackEncoder::EncodeHeaderSet( |
| 368 const SpdyHeaderBlock& header_set) { | 367 const SpdyHeaderBlock& header_set) { |
| 369 return SpdyMakeUnique<Encoderator>(header_set, this); | 368 return SpdyMakeUnique<Encoderator>(header_set, this); |
| 370 } | 369 } |
| 371 | 370 |
| 372 } // namespace net | 371 } // namespace net |
| OLD | NEW |