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

Side by Side Diff: net/base/bzip2_filter.cc

Issue 40138: Use FilterContext to allow filters to access URLRequestJob data... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "net/base/bzip2_filter.h" 6 #include "net/base/bzip2_filter.h"
7 7
8 BZip2Filter::BZip2Filter() 8 BZip2Filter::BZip2Filter(const FilterContext& filter_context)
9 : decoding_status_(DECODING_UNINITIALIZED), 9 : Filter(filter_context),
10 decoding_status_(DECODING_UNINITIALIZED),
10 bzip2_data_stream_(NULL) { 11 bzip2_data_stream_(NULL) {
11 } 12 }
12 13
13 BZip2Filter::~BZip2Filter() { 14 BZip2Filter::~BZip2Filter() {
14 if (bzip2_data_stream_.get() && 15 if (bzip2_data_stream_.get() &&
15 decoding_status_ != DECODING_UNINITIALIZED) { 16 decoding_status_ != DECODING_UNINITIALIZED) {
16 BZ2_bzDecompressEnd(bzip2_data_stream_.get()); 17 BZ2_bzDecompressEnd(bzip2_data_stream_.get());
17 } 18 }
18 } 19 }
19 20
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } else if (BZ_STREAM_END == ret) { 90 } else if (BZ_STREAM_END == ret) {
90 status = Filter::FILTER_DONE; 91 status = Filter::FILTER_DONE;
91 decoding_status_ = DECODING_DONE; 92 decoding_status_ = DECODING_DONE;
92 } else { 93 } else {
93 decoding_status_ = DECODING_ERROR; 94 decoding_status_ = DECODING_ERROR;
94 } 95 }
95 96
96 return status; 97 return status;
97 } 98 }
98 99
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698