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

Unified Diff: net/filter/filter_source_stream.h

Issue 2338043002: Change DrainableIOBuffer to IBuffer and int* in FilterData() arguments (Closed)
Patch Set: rebased to r418859 and add DCHECKs Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/filter/filter_source_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/filter/filter_source_stream.h
diff --git a/net/filter/filter_source_stream.h b/net/filter/filter_source_stream.h
index 562717f52fa51e3cd34ce5045b1d542739eb5f5c..3d24bd1a92116f0079702c16436a2ed334753ce0 100644
--- a/net/filter/filter_source_stream.h
+++ b/net/filter/filter_source_stream.h
@@ -66,15 +66,16 @@ class NET_EXPORT_PRIVATE FilterSourceStream : public SourceStream {
// ERR_IO_PENDING). If an unrecoverable error occurred, this should return
// ERR_CONTENT_DECODING_FAILED or a more specific error code.
//
- // FilterData() will be repeatedly invoked with the same |input_buffer| until
- // FilterData() returns 0 or an error. If FilterData() returns 0,
- // |input_buffer| must be fully drained. Upstream EOF is reached when
- // FilterData() is called with |upstream_eof_reached| = true.
+ // If FilterData() returns 0, *|consumed_bytes| must be equal to
+ // |input_buffer_size|. Upstream EOF is reached when FilterData() is called
+ // with |upstream_eof_reached| = true.
// TODO(xunjieli): consider allowing asynchronous response via callback
// to support off-thread decompression.
virtual int FilterData(IOBuffer* output_buffer,
int output_buffer_size,
- DrainableIOBuffer* input_buffer,
+ IOBuffer* input_buffer,
+ int input_buffer_size,
+ int* consumed_bytes,
bool upstream_eof_reached) = 0;
// Returns a string representation of the type of this FilterSourceStream.
« no previous file with comments | « no previous file | net/filter/filter_source_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698