Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: net/filter/gzip_filter.cc

Issue 737943002: Update from https://crrev.com/304715 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/filter/gzip_filter.h ('k') | net/filter/sdch_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/logging.h" 7 #include "base/logging.h"
8 #include "net/filter/gzip_header.h" 8 #include "net/filter/gzip_header.h"
9 #include "third_party/zlib/zlib.h" 9 #include "third_party/zlib/zlib.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 GZipFilter::GZipFilter() 13 GZipFilter::GZipFilter(FilterType type)
14 : decoding_status_(DECODING_UNINITIALIZED), 14 : Filter(type),
15 decoding_status_(DECODING_UNINITIALIZED),
15 decoding_mode_(DECODE_MODE_UNKNOWN), 16 decoding_mode_(DECODE_MODE_UNKNOWN),
16 gzip_header_status_(GZIP_CHECK_HEADER_IN_PROGRESS), 17 gzip_header_status_(GZIP_CHECK_HEADER_IN_PROGRESS),
17 zlib_header_added_(false), 18 zlib_header_added_(false),
18 gzip_footer_bytes_(0), 19 gzip_footer_bytes_(0),
19 possible_sdch_pass_through_(false) { 20 possible_sdch_pass_through_(false) {
20 } 21 }
21 22
22 GZipFilter::~GZipFilter() { 23 GZipFilter::~GZipFilter() {
23 if (decoding_status_ != DECODING_UNINITIALIZED) { 24 if (decoding_status_ != DECODING_UNINITIALIZED) {
24 inflateEnd(zlib_stream_.get()); 25 inflateEnd(zlib_stream_.get());
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 stream_data_len_ -= footer_byte_avail; 290 stream_data_len_ -= footer_byte_avail;
290 next_stream_data_ += footer_byte_avail; 291 next_stream_data_ += footer_byte_avail;
291 gzip_footer_bytes_ += footer_byte_avail; 292 gzip_footer_bytes_ += footer_byte_avail;
292 293
293 if (stream_data_len_ == 0) 294 if (stream_data_len_ == 0)
294 next_stream_data_ = NULL; 295 next_stream_data_ = NULL;
295 } 296 }
296 } 297 }
297 298
298 } // namespace net 299 } // namespace net
OLDNEW
« no previous file with comments | « net/filter/gzip_filter.h ('k') | net/filter/sdch_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698