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

Unified Diff: net/base/sdch_manager.h

Issue 642403002: git cl format the first third of the net/base directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: net/base/sdch_manager.h
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index 18f67491a08eb6bfb3d0f6b9053721e9491f5e85..156ed7f27060e1770a2716d37537413cc80225d8 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -71,9 +71,8 @@ class NET_EXPORT SdchFetcher {
//------------------------------------------------------------------------------
-class NET_EXPORT SdchManager
- : public SdchFetcher::Delegate,
- public NON_EXPORTED_BASE(base::NonThreadSafe) {
+class NET_EXPORT SdchManager : public SdchFetcher::Delegate,
+ public NON_EXPORTED_BASE(base::NonThreadSafe) {
public:
// A list of errors that appeared and were either resolved, or used to turn
// off sdch encoding.
@@ -120,7 +119,7 @@ class NET_EXPORT SdchManager
DICTIONARY_SELECTED_FOR_SSL = 31,
DICTIONARY_ALREADY_LOADED = 32,
DICTIONARY_SELECTED_FROM_NON_HTTP = 33,
- DICTIONARY_IS_TOO_LARGE= 34,
+ DICTIONARY_IS_TOO_LARGE = 34,
DICTIONARY_COUNT_EXCEEDED = 35,
DICTIONARY_ALREADY_SCHEDULED_TO_DOWNLOAD = 36,
DICTIONARY_ALREADY_TRIED_TO_DOWNLOAD = 37,
@@ -129,7 +128,6 @@ class NET_EXPORT SdchManager
// Failsafe hack.
ATTEMPT_TO_DECODE_NON_HTTP_DATA = 40,
-
// Content-Encoding problems detected, with no action taken.
MULTIENCODING_FOR_NON_SDCH_REQUEST = 50,
SDCH_CONTENT_ENCODE_FOR_NON_SDCH_REQUEST = 51,
@@ -138,11 +136,11 @@ class NET_EXPORT SdchManager
DOMAIN_BLACKLIST_INCLUDES_TARGET = 61,
// Problematic decode recovery methods.
- META_REFRESH_RECOVERY = 70, // Dictionary not found.
+ META_REFRESH_RECOVERY = 70, // Dictionary not found.
// defunct = 71, // Almost the same as META_REFRESH_UNSUPPORTED.
// defunct = 72, // Almost the same as CACHED_META_REFRESH_UNSUPPORTED.
// defunct = 73, // PASSING_THROUGH_NON_SDCH plus
- // RESPONSE_TENTATIVE_SDCH in ../filter/sdch_filter.cc.
+ // RESPONSE_TENTATIVE_SDCH in ../filter/sdch_filter.cc.
Ryan Sleevi 2014/10/11 02:04:47 BUG in clang-format
jkarlin 2014/10/16 00:19:32 You think? It seems like it's asking a bit much t
jkarlin 2014/11/11 19:01:44 Fixed by adding whitespace.
META_REFRESH_UNSUPPORTED = 74, // Unrecoverable error.
CACHED_META_REFRESH_UNSUPPORTED = 75, // As above, but pulled from cache.
PASSING_THROUGH_NON_SDCH = 76, // Tagged sdch but missing dictionary-hash.
@@ -151,7 +149,7 @@ class NET_EXPORT SdchManager
// This next report is very common, and not really an error scenario, but
// it exercises the error recovery logic.
- PASS_THROUGH_OLD_CACHED = 79, // Back button got pre-SDCH cached content.
+ PASS_THROUGH_OLD_CACHED = 79, // Back button got pre-SDCH cached content.
// Common decoded recovery methods.
META_REFRESH_CACHED_RECOVERY = 80, // Probably startup tab loading.
@@ -161,9 +159,9 @@ class NET_EXPORT SdchManager
// (i.e., be able to be sure all dictionary advertisements are accounted
// for).
- UNFLUSHED_CONTENT = 90, // Possible error in filter chaining.
+ UNFLUSHED_CONTENT = 90, // Possible error in filter chaining.
// defunct = 91, // MISSING_TIME_STATS (Should never happen.)
- CACHE_DECODED = 92, // No timing stats recorded.
+ CACHE_DECODED = 92, // No timing stats recorded.
Ryan Sleevi 2014/10/11 02:04:47 bug in clang-format
jkarlin 2014/10/16 00:19:32 ditto
jkarlin 2014/11/11 19:01:44 It would be nice if it lined up better but it seem
// 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.
@@ -214,8 +212,10 @@ class NET_EXPORT SdchManager
// Security methods to check if we can establish a new dictionary with the
// given data, that arrived in response to get of dictionary_url.
- static bool CanSet(const std::string& domain, const std::string& path,
- const std::set<int>& ports, const GURL& dictionary_url);
+ static bool CanSet(const std::string& domain,
+ const std::string& path,
+ const std::set<int>& ports,
+ const GURL& dictionary_url);
// Security method to check if we can use a dictionary to decompress a
// target that arrived with a reference to this dictionary.
@@ -228,7 +228,6 @@ class NET_EXPORT SdchManager
// Compare domains to see if the "match" for dictionary use.
static bool DomainMatch(const GURL& url, const std::string& restriction);
-
// The actual text of the dictionary.
std::string text_;
@@ -335,7 +334,8 @@ class NET_EXPORT SdchManager
// dictionary. This is only made public to facilitate unit testing, but is
// otherwise private
static void GenerateHash(const std::string& dictionary_text,
- std::string* client_hash, std::string* server_hash);
+ 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
@@ -345,9 +345,7 @@ class NET_EXPORT SdchManager
void SetAllowLatencyExperiment(const GURL& url, bool enable);
- int GetFetchesCountForTesting() const {
- return fetches_count_for_testing_;
- }
+ int GetFetchesCountForTesting() const { return fetches_count_for_testing_; }
// Implementation of SdchFetcher::Delegate.
@@ -361,14 +359,11 @@ class NET_EXPORT SdchManager
private:
struct BlacklistInfo {
BlacklistInfo()
- : count(0),
- exponential_count(0),
- reason(MIN_PROBLEM_CODE) {}
-
- int count; // # of times to refuse SDCH advertisement.
- int exponential_count; // Current exponential backoff ratchet.
- ProblemCodes reason; // Why domain was blacklisted.
+ : count(0), exponential_count(0), reason(MIN_PROBLEM_CODE) {}
+ int count; // # of times to refuse SDCH advertisement.
+ int exponential_count; // Current exponential backoff ratchet.
+ ProblemCodes reason; // Why domain was blacklisted.
};
typedef std::map<std::string, BlacklistInfo> DomainBlacklistInfo;
typedef std::set<std::string> ExperimentSet;

Powered by Google App Engine
This is Rietveld 408576698