| OLD | NEW |
| 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" | |
| 6 #include "net/base/bzip2_filter.h" | 5 #include "net/base/bzip2_filter.h" |
| 7 | 6 |
| 8 BZip2Filter::BZip2Filter(const FilterContext& filter_context) | 7 BZip2Filter::BZip2Filter(const FilterContext& filter_context) |
| 9 : Filter(filter_context), | 8 : Filter(filter_context), |
| 10 decoding_status_(DECODING_UNINITIALIZED), | 9 decoding_status_(DECODING_UNINITIALIZED), |
| 11 bzip2_data_stream_(NULL) { | 10 bzip2_data_stream_(NULL) { |
| 12 } | 11 } |
| 13 | 12 |
| 14 BZip2Filter::~BZip2Filter() { | 13 BZip2Filter::~BZip2Filter() { |
| 15 if (bzip2_data_stream_.get() && | 14 if (bzip2_data_stream_.get() && |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 status = Filter::FILTER_NEED_MORE_DATA; | 88 status = Filter::FILTER_NEED_MORE_DATA; |
| 90 } else if (BZ_STREAM_END == ret) { | 89 } else if (BZ_STREAM_END == ret) { |
| 91 status = Filter::FILTER_DONE; | 90 status = Filter::FILTER_DONE; |
| 92 decoding_status_ = DECODING_DONE; | 91 decoding_status_ = DECODING_DONE; |
| 93 } else { | 92 } else { |
| 94 decoding_status_ = DECODING_ERROR; | 93 decoding_status_ = DECODING_ERROR; |
| 95 } | 94 } |
| 96 | 95 |
| 97 return status; | 96 return status; |
| 98 } | 97 } |
| OLD | NEW |