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

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: Nit 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/base/sdch_manager.h
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index ff157e52a32e1cb04e955f467b3c524cba11b6a7..78fe9f84c1d79970f08fb3b7015bb8e2cb301b4f 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -80,7 +80,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,
@@ -89,7 +89,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,
@@ -98,11 +97,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.
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.
@@ -111,7 +110,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.
@@ -121,9 +120,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.
// 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.
@@ -174,8 +173,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.
@@ -188,7 +189,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_;
@@ -285,7 +285,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
@@ -309,14 +310,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