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/filter/gzip_filter.h" | 5 #include "net/filter/gzip_filter.h" |
6 | 6 |
| 7 #include "base/bit_cast.h" |
7 #include "base/logging.h" | 8 #include "base/logging.h" |
8 #include "net/filter/gzip_header.h" | 9 #include "net/filter/gzip_header.h" |
9 #include "third_party/zlib/zlib.h" | 10 #include "third_party/zlib/zlib.h" |
10 | 11 |
11 namespace net { | 12 namespace net { |
12 | 13 |
13 GZipFilter::GZipFilter(FilterType type) | 14 GZipFilter::GZipFilter(FilterType type) |
14 : Filter(type), | 15 : Filter(type), |
15 decoding_status_(DECODING_UNINITIALIZED), | 16 decoding_status_(DECODING_UNINITIALIZED), |
16 decoding_mode_(DECODE_MODE_UNKNOWN), | 17 decoding_mode_(DECODE_MODE_UNKNOWN), |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 stream_data_len_ -= footer_byte_avail; | 291 stream_data_len_ -= footer_byte_avail; |
291 next_stream_data_ += footer_byte_avail; | 292 next_stream_data_ += footer_byte_avail; |
292 gzip_footer_bytes_ += footer_byte_avail; | 293 gzip_footer_bytes_ += footer_byte_avail; |
293 | 294 |
294 if (stream_data_len_ == 0) | 295 if (stream_data_len_ == 0) |
295 next_stream_data_ = NULL; | 296 next_stream_data_ = NULL; |
296 } | 297 } |
297 } | 298 } |
298 | 299 |
299 } // namespace net | 300 } // namespace net |
OLD | NEW |