Chromium Code Reviews| 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 // SdchFilter applies open_vcdiff content decoding to a datastream. | 5 // SdchFilter applies open_vcdiff content decoding to a datastream. |
| 6 // This decoding uses a pre-cached dictionary of text fragments to decode | 6 // This decoding uses a pre-cached dictionary of text fragments to decode |
| 7 // (expand) the stream back to its original contents. | 7 // (expand) the stream back to its original contents. |
| 8 // | 8 // |
| 9 // This SdchFilter internally uses open_vcdiff/vcdec library to do decoding. | 9 // This SdchFilter internally uses open_vcdiff/vcdec library to do decoding. |
| 10 // | 10 // |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 explicit SdchFilter(const FilterContext& filter_context); | 58 explicit SdchFilter(const FilterContext& filter_context); |
| 59 friend class Filter; | 59 friend class Filter; |
| 60 | 60 |
| 61 // Identify the suggested dictionary, and initialize underlying decompressor. | 61 // Identify the suggested dictionary, and initialize underlying decompressor. |
| 62 Filter::FilterStatus InitializeDictionary(); | 62 Filter::FilterStatus InitializeDictionary(); |
| 63 | 63 |
| 64 // Move data that was internally buffered (after decompression) to the | 64 // Move data that was internally buffered (after decompression) to the |
| 65 // specified dest_buffer. | 65 // specified dest_buffer. |
| 66 int OutputBufferExcess(char* const dest_buffer, size_t available_space); | 66 int OutputBufferExcess(char* const dest_buffer, size_t available_space); |
| 67 | 67 |
| 68 SdchManager* GetSdchManager() const; | |
|
Randy Smith (Not in Mondays)
2014/08/05 17:50:34
As best I can tell, this is only used once, and th
baranovich
2014/08/12 20:54:50
Done. Deleted, It was unnecessary.
| |
| 69 | |
| 68 // Context data from the owner of this filter. | 70 // Context data from the owner of this filter. |
| 69 const FilterContext& filter_context_; | 71 const FilterContext& filter_context_; |
| 70 | 72 |
| 71 // Tracks the status of decoding. | 73 // Tracks the status of decoding. |
| 72 // This variable is initialized by InitDecoding and updated only by | 74 // This variable is initialized by InitDecoding and updated only by |
| 73 // ReadFilteredData. | 75 // ReadFilteredData. |
| 74 DecodingStatus decoding_status_; | 76 DecodingStatus decoding_status_; |
| 75 | 77 |
| 76 // The underlying decoder that processes data. | 78 // The underlying decoder that processes data. |
| 77 // This data structure is initialized by InitDecoding and updated in | 79 // This data structure is initialized by InitDecoding and updated in |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 // To facilitate error recovery, allow filter to know if content is text/html | 128 // To facilitate error recovery, allow filter to know if content is text/html |
| 127 // by checking within this mime type (we may do a meta-refresh via html). | 129 // by checking within this mime type (we may do a meta-refresh via html). |
| 128 std::string mime_type_; | 130 std::string mime_type_; |
| 129 | 131 |
| 130 DISALLOW_COPY_AND_ASSIGN(SdchFilter); | 132 DISALLOW_COPY_AND_ASSIGN(SdchFilter); |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 } // namespace net | 135 } // namespace net |
| 134 | 136 |
| 135 #endif // NET_FILTER_SDCH_FILTER_H_ | 137 #endif // NET_FILTER_SDCH_FILTER_H_ |
| OLD | NEW |