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

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 up to p303887 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 37f55e218b41e53cd57271eaedf9e729c13c0012..413821d959941bb42747cb4d9f214c33454308e9 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;
@@ -70,6 +71,14 @@ class IOBuffer;
// 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
@@ -106,7 +115,8 @@ 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;
Bence 2014/11/12 21:46:26 From the Google C++ style guide: "If you break af
Randy Smith (Not in Mondays) 2014/11/13 22:11:02 Moot; fits on one line anyway :-}. Fixed.
// 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