diff options
-rw-r--r-- | net/base/sdch_manager.cc | 8 | ||||
-rw-r--r-- | net/base/sdch_manager.h | 8 | ||||
-rw-r--r-- | net/http/http_util.cc | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc index 4dbde70..e617ea3 100644 --- a/net/base/sdch_manager.cc +++ b/net/base/sdch_manager.cc @@ -45,12 +45,12 @@ void SdchManager::ClearBlacklistings() { } // static -void SdchManager::ClearDomainBlacklisting(std::string domain) { +void SdchManager::ClearDomainBlacklisting(const std::string& domain) { Global()->blacklisted_domains_.erase(StringToLowerASCII(domain)); } // static -int SdchManager::BlackListDomainCount(std::string domain) { +int SdchManager::BlackListDomainCount(const std::string& domain) { if (Global()->blacklisted_domains_.end() == Global()->blacklisted_domains_.find(domain)) return 0; @@ -58,7 +58,7 @@ int SdchManager::BlackListDomainCount(std::string domain) { } // static -int SdchManager::BlacklistDomainExponential(std::string domain) { +int SdchManager::BlacklistDomainExponential(const std::string& domain) { if (Global()->exponential_blacklist_count.end() == Global()->exponential_blacklist_count.find(domain)) return 0; @@ -428,7 +428,7 @@ bool SdchManager::Dictionary::CanSet(const std::string& domain, } // static -bool SdchManager::Dictionary::CanUse(const GURL referring_url) { +bool SdchManager::Dictionary::CanUse(const GURL& referring_url) { if (!SdchManager::Global()->IsInSupportedDomain(referring_url)) return false; /* diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h index c95b890..5716da9 100644 --- a/net/base/sdch_manager.h +++ b/net/base/sdch_manager.h @@ -184,7 +184,7 @@ class SdchManager { // Security method to check if we can use a dictionary to decompress a // target that arrived with a reference to this dictionary. - bool CanUse(const GURL referring_url); + bool CanUse(const GURL& referring_url); // Compare paths to see if they "match" for dictionary use. static bool PathMatch(const std::string& path, @@ -256,13 +256,13 @@ class SdchManager { static void ClearBlacklistings(); // Unit test only, this function resets the blacklisting count for a domain. - static void ClearDomainBlacklisting(std::string domain); + static void ClearDomainBlacklisting(const std::string& domain); // Unit test only: indicate how many more times a domain will be blacklisted. - static int BlackListDomainCount(std::string domain); + static int BlackListDomainCount(const std::string& domain); // Unit test only: Indicate what current blacklist increment is for a domain. - static int BlacklistDomainExponential(std::string domain); + static int BlacklistDomainExponential(const std::string& domain); // Check to see if SDCH is enabled (globally), and the given URL is in a // supported domain (i.e., not blacklisted, and either the specific supported diff --git a/net/http/http_util.cc b/net/http/http_util.cc index f3e0835..5e81dab 100644 --- a/net/http/http_util.cc +++ b/net/http/http_util.cc @@ -592,7 +592,7 @@ std::string HttpUtil::GenerateAcceptLanguageHeader( // q=1.0 is implicit. lang_list_with_q = language; } else { - DCHECK(qvalue10 >= 0 && qvalue10 < 10); + DCHECK_LT(qvalue10, 10U); StringAppendF(&lang_list_with_q, ",%s;q=0.%d", language.c_str(), qvalue10); } |