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

Unified Diff: net/base/filter.h

Issue 6516025: Remove GetInputStreamBufferSize() method from FilterContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed lint Created 9 years, 10 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/base/filter.cc » ('j') | net/base/sdch_filter_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filter.h
diff --git a/net/base/filter.h b/net/base/filter.h
index c6004e9d754385c96e419dd5fffc9d76947e68bb..b4bc4a400b4273093ea0e1f126ea6c631c0929d3 100644
--- a/net/base/filter.h
+++ b/net/base/filter.h
@@ -43,6 +43,7 @@ class GURL;
namespace net {
class IOBuffer;
+class SdchFilterChainingTest;
}
//------------------------------------------------------------------------------
@@ -94,13 +95,6 @@ class FilterContext {
// For example: 200 is ok. 4xx are error codes. etc.
virtual int GetResponseCode() const = 0;
- // What is the desirable input buffer size for these filters?
- // This value is currently supplied by the context, and is constant for all
- // filters, even when they are part of a chain of filters. (i.e., we currently
- // don't change the input buffer sizes for a linked chain of filters, and the
- // buffer size for input to all filters in a chain is this one constant).
- virtual int GetInputStreamBufferSize() const = 0;
-
// The following method forces the context to emit a specific set of
// statistics as selected by the argument.
virtual void RecordPacketStats(StatisticSelector statistic) const = 0;
@@ -199,7 +193,11 @@ class Filter {
std::vector<FilterType>* encoding_types);
protected:
- FRIEND_TEST_ALL_PREFIXES(SdchFilterTest, ContentTypeId);
+ FRIEND_TEST_ALL_PREFIXES(GZipUnitTest, DecodeWithSmallBuffer);
+ FRIEND_TEST_ALL_PREFIXES(GZipUnitTest, DecodeWithOneByteBuffer);
+ FRIEND_TEST_ALL_PREFIXES(GZipUnitTest,
+ DecodeWithOneByteInputAndOutputBuffer);
+ friend class net::SdchFilterChainingTest;
explicit Filter(const FilterContext& filter_context);
@@ -245,14 +243,13 @@ class Filter {
const FilterContext& filter_context,
Filter* filter_list);
- // Allocates and initializes stream_buffer_ based on filter_context_.
- // Establishes a buffer large enough to handle the amount specified in
- // filter_context_.GetInputStreamBufferSize().
- bool InitBuffer();
-
// Helper function to empty our output into the next filter's input.
void PushDataIntoNextFilter();
+ // Resets the filter's internal buffer to the given size. Should only
+ // be called in unit tests, and only immediately after filter construction.
+ void ResetInputBufferForTest(int size);
+
// An optional filter to process output from this filter.
scoped_ptr<Filter> next_filter_;
// Remember what status or local filter last returned so we can better handle
« no previous file with comments | « no previous file | net/base/filter.cc » ('j') | net/base/sdch_filter_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698