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

Side by Side Diff: net/filter/filter.h

Issue 2266693002: Implement "streaming" $i18n{} replacer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compress-webui2
Patch Set: Created 4 years, 4 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
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.cc ('k') | net/filter/filter.cc » ('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 // 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 // std::unique_ptr<Filter> filter = Filter::Factory(filter_type, size); 9 // std::unique_ptr<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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // response was made to an SDCH request (i.e., an available dictionary was 232 // response was made to an SDCH request (i.e., an available dictionary was
233 // advertised in the GET), as well as the mime type of the content. 233 // advertised in the GET), as well as the mime type of the content.
234 static void FixupEncodingTypes(const FilterContext& filter_context, 234 static void FixupEncodingTypes(const FilterContext& filter_context,
235 std::vector<FilterType>* encoding_types); 235 std::vector<FilterType>* encoding_types);
236 236
237 // Returns a string describing the FilterTypes implemented by this filter. 237 // Returns a string describing the FilterTypes implemented by this filter.
238 std::string OrderedFilterList() const; 238 std::string OrderedFilterList() const;
239 239
240 FilterType type() const { return type_id_; } 240 FilterType type() const { return type_id_; }
241 241
242 // Sets |next_filter| as the next filter to be run, disconnecting any existing
243 // chain.
244 void TakeNextFilter(std::unique_ptr<Filter> next_filter);
245
242 protected: 246 protected:
243 friend class BrotliUnitTest; 247 friend class BrotliUnitTest;
244 friend class GZipUnitTest; 248 friend class GZipUnitTest;
245 friend class SdchFilterChainingTest; 249 friend class SdchFilterChainingTest;
246 FRIEND_TEST_ALL_PREFIXES(FilterTest, ThreeFilterChain); 250 FRIEND_TEST_ALL_PREFIXES(FilterTest, ThreeFilterChain);
247 251
248 explicit Filter(FilterType type_id); 252 explicit Filter(FilterType type_id);
249 253
250 // Filters the data stored in stream_buffer_ and writes the output into the 254 // Filters the data stored in stream_buffer_ and writes the output into the
251 // dest_buffer passed in. 255 // dest_buffer passed in.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 326
323 // The filter type this filter was constructed from. 327 // The filter type this filter was constructed from.
324 FilterType type_id_; 328 FilterType type_id_;
325 329
326 DISALLOW_COPY_AND_ASSIGN(Filter); 330 DISALLOW_COPY_AND_ASSIGN(Filter);
327 }; 331 };
328 332
329 } // namespace net 333 } // namespace net
330 334
331 #endif // NET_FILTER_FILTER_H__ 335 #endif // NET_FILTER_FILTER_H__
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_data_source_impl.cc ('k') | net/filter/filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698