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

Unified Diff: net/base/sdch_filter.h

Issue 40319: Use filter context to track stats better in SDCH filtering (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « net/base/filter_unittest.cc ('k') | net/base/sdch_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_filter.h
===================================================================
--- net/base/sdch_filter.h (revision 11636)
+++ net/base/sdch_filter.h (working copy)
@@ -84,9 +84,10 @@
// attempted.
bool dictionary_hash_is_plausible_;
- // We hold an in-memory copy of the dictionary during the entire decoding.
- // The char* data is embedded in a RefCounted dictionary_.
- SdchManager::Dictionary* dictionary_;
+ // We hold an in-memory copy of the dictionary during the entire decoding, as
+ // it is used directly by the VC-DIFF decoding system.
+ // That char* data is part of the dictionary_ we hold a reference to.
+ scoped_refptr<SdchManager::Dictionary> dictionary_;
// The decoder may demand a larger output buffer than the target of
// ReadFilteredData so we buffer the excess output between calls.
@@ -109,6 +110,21 @@
// an applicable dictionary can't be found.
bool possible_pass_through_;
+ // The URL that is currently being filtered.
+ // This is used to restrict use of a dictionary to a specific URL or path.
+ GURL url_;
+
+ // To facilitate histogramming by individual filters, we store the connect
+ // time for the corresponding HTTP transaction, as well as whether this time
+ // was recalled from a cached entry. The time is approximate, and may be
+ // bogus if the data was gotten from cache (i.e., it may be LOOOONG ago).
+ const base::Time connect_time_;
+ const bool was_cached_;
+
+ // To facilitate error recovery, allow filter to know if content is text/html
+ // by checking within this mime type (we may do a meta-refresh via html).
+ std::string mime_type_;
+
DISALLOW_COPY_AND_ASSIGN(SdchFilter);
};
« no previous file with comments | « net/base/filter_unittest.cc ('k') | net/base/sdch_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698