| 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 // Filter performs filtering on data streams. Sample usage: | 5 // Filter performs filtering on data streams. Sample usage: |
| 6 // | 6 // |
| 7 // IStream* pre_filter_source; | 7 // IStream* pre_filter_source; |
| 8 // ... | 8 // ... |
| 9 // Filter* filter = Filter::Factory(filter_type, size); | 9 // Filter* filter = Filter::Factory(filter_type, size); |
| 10 // int pre_filter_data_len = filter->stream_buffer_size(); | 10 // int pre_filter_data_len = filter->stream_buffer_size(); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // stream. | 121 // stream. |
| 122 FILTER_DONE, | 122 FILTER_DONE, |
| 123 // There is an error during filtering. | 123 // There is an error during filtering. |
| 124 FILTER_ERROR | 124 FILTER_ERROR |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 // Specifies type of filters that can be created. | 127 // Specifies type of filters that can be created. |
| 128 enum FilterType { | 128 enum FilterType { |
| 129 FILTER_TYPE_DEFLATE, | 129 FILTER_TYPE_DEFLATE, |
| 130 FILTER_TYPE_GZIP, | 130 FILTER_TYPE_GZIP, |
| 131 FILTER_TYPE_BZIP2, | |
| 132 FILTER_TYPE_GZIP_HELPING_SDCH, // Gzip possible, but pass through allowed. | 131 FILTER_TYPE_GZIP_HELPING_SDCH, // Gzip possible, but pass through allowed. |
| 133 FILTER_TYPE_SDCH, | 132 FILTER_TYPE_SDCH, |
| 134 FILTER_TYPE_SDCH_POSSIBLE, // Sdch possible, but pass through allowed. | 133 FILTER_TYPE_SDCH_POSSIBLE, // Sdch possible, but pass through allowed. |
| 135 FILTER_TYPE_UNSUPPORTED, | 134 FILTER_TYPE_UNSUPPORTED, |
| 136 }; | 135 }; |
| 137 | 136 |
| 138 virtual ~Filter(); | 137 virtual ~Filter(); |
| 139 | 138 |
| 140 // Creates a Filter object. | 139 // Creates a Filter object. |
| 141 // Parameters: Filter_types specifies the type of filter created; | 140 // Parameters: Filter_types specifies the type of filter created; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 259 |
| 261 // Context data from the owner of this filter. Some filters need additional | 260 // Context data from the owner of this filter. Some filters need additional |
| 262 // context information (mime type, etc.) to properly function, and they access | 261 // context information (mime type, etc.) to properly function, and they access |
| 263 // this data via this reference member. | 262 // this data via this reference member. |
| 264 const FilterContext& filter_context_; | 263 const FilterContext& filter_context_; |
| 265 | 264 |
| 266 DISALLOW_COPY_AND_ASSIGN(Filter); | 265 DISALLOW_COPY_AND_ASSIGN(Filter); |
| 267 }; | 266 }; |
| 268 | 267 |
| 269 #endif // NET_BASE_FILTER_H__ | 268 #endif // NET_BASE_FILTER_H__ |
| OLD | NEW |