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

Unified Diff: net/filter/filter.h

Issue 711753003: Pin dictionaries from being deleted while request is outstanding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync'd past SDCH net-internals CL (423813002) Created 6 years, 1 month 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
Index: net/filter/filter.h
diff --git a/net/filter/filter.h b/net/filter/filter.h
index 13489ef02823b054e38eba6cfe0eb3569055f336..20f2bfdbfd06c4c784d933a0ca19ee4bc4cbd254 100644
--- a/net/filter/filter.h
+++ b/net/filter/filter.h
@@ -55,6 +55,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "net/base/net_export.h"
+#include "net/base/sdch_manager.h"
class GURL;
@@ -71,6 +72,14 @@ class URLRequestContext;
// is passed to the constructor of all those filters. To be clear, the context
// does NOT reflect the position in a chain, or the fact that there are prior
// or later filters in a chain.
+//
+// TODO(rdsmith): FilterContext is a grab-bag of methods which may or may
+// not be relevant for any particular filter, and it's getting worse over
+// time. In addition, it only supports two filters, SDCH and gzip.
+// It would make more sense to implement FilterContext as a
+// base::SupportsUserData structure to which filter-specific information
+// could be added by whatever the ultimate consumer of the filter chain is,
+// and a particular filter (if included) could access that information.
class NET_EXPORT_PRIVATE FilterContext {
public:
// Enum to control what histograms are emitted near end-of-life of this
@@ -107,7 +116,7 @@ class NET_EXPORT_PRIVATE FilterContext {
virtual bool IsDownload() const = 0;
// Was this data flagged as a response to a request with an SDCH dictionary?
- virtual bool SdchResponseExpected() const = 0;
+ virtual SdchManager::DictionarySet* SdchDictionariesAdvertised() const = 0;
// How many bytes were read from the net or cache so far (and potentially
// pushed into a filter for processing)?

Powered by Google App Engine
This is Rietveld 408576698