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

Unified Diff: net/base/sdch_manager.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 | « net/base/sdch_filter_unittest.cc ('k') | net/base/sdch_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager.h
===================================================================
--- net/base/sdch_manager.h (revision 14822)
+++ net/base/sdch_manager.h (working copy)
@@ -130,14 +130,17 @@
// (i.e., be able to be sure all dictionary advertisements are accounted
// for).
- UNFLUSHED_CONTENT = 90, // Possible error in filter chaining.
- MISSING_TIME_STATS = 91, // Should never happen.
- CACHE_DECODED = 92, // No timing stats recorded.
- OVER_10_MINUTES = 93, // No timing stats will be recorded.
- UNINITIALIZED = 94, // Filter never even got initialized.
- PRIOR_TO_DICTIONARY = 95, // We hadn't even parsed a dictionary selector.
- DECODE_ERROR = 96, // Something went wrong during decode.
+ UNFLUSHED_CONTENT = 90, // Possible error in filter chaining.
+ // defunct = 91, // MISSING_TIME_STATS (Should never happen.)
+ CACHE_DECODED = 92, // No timing stats recorded.
+ // defunct = 93, // OVER_10_MINUTES (No timing stats recorded.)
+ UNINITIALIZED = 94, // Filter never even got initialized.
+ PRIOR_TO_DICTIONARY = 95, // We hadn't even parsed a dictionary selector.
+ DECODE_ERROR = 96, // Something went wrong during decode.
+ // Problem during the latency test.
+ LATENCY_TEST_DISALLOWED = 100, // SDCH now failing, but it worked before!
+
MAX_PROBLEM_CODE // Used to bound histogram.
};
@@ -302,8 +305,17 @@
static void GenerateHash(const std::string& dictionary_text,
std::string* client_hash, std::string* server_hash);
+ // For Latency testing only, we need to know if we've succeeded in doing a
+ // round trip before starting our comparative tests. If ever we encounter
+ // problems with SDCH, we opt-out of the test unless/until we perform a
+ // complete SDCH decoding.
+ bool AllowLatencyExperiment(const GURL& url) const;
+
+ void SetAllowLatencyExperiment(const GURL& url, bool enable);
+
private:
- typedef std::map<const std::string, int> DomainCounter;
+ typedef std::map<std::string, int> DomainCounter;
+ typedef std::set<std::string> ExperimentSet;
// A map of dictionaries info indexed by the hash that the server provides.
typedef std::map<std::string, Dictionary*> DictionaryMap;
@@ -334,6 +346,10 @@
// blacklisting expires.
DomainCounter exponential_blacklist_count;
+ // List of hostnames for which a latency experiment is allowed (because a
+ // round trip test has recently passed).
+ ExperimentSet allow_latency_experiment_;
+
DISALLOW_COPY_AND_ASSIGN(SdchManager);
};
« no previous file with comments | « net/base/sdch_filter_unittest.cc ('k') | net/base/sdch_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698