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

Unified Diff: net/base/filter.h

Issue 100004: Hand craft an A/B test of SDCH compression... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filter.h
===================================================================
--- net/base/filter.h (revision 14822)
+++ net/base/filter.h (working copy)
@@ -48,6 +48,15 @@
// or later filters in a chain.
class FilterContext {
public:
+ // Enum to control what histograms are emitted near end-of-life of this
+ // instance.
+ enum StatisticSelector {
+ SDCH_DECODE,
+ SDCH_PASSTHROUGH,
+ SDCH_EXPERIMENT_DECODE,
+ SDCH_EXPERIMENT_HOLDBACK,
+ };
+
virtual ~FilterContext() {}
// What mime type was specified in the header for this data?
@@ -85,6 +94,10 @@
// 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;
};
//------------------------------------------------------------------------------
@@ -179,6 +192,7 @@
// advertised in the GET), as well as the mime type of the content.
static void FixupEncodingTypes(const FilterContext& filter_context,
std::vector<FilterType>* encoding_types);
+
protected:
explicit Filter(const FilterContext& filter_context);
« no previous file with comments | « no previous file | net/base/filter_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698