diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 01:27:46 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 01:27:46 +0000 |
commit | d155c510094276cf2fdbc3b23d0ceb387e645ac6 (patch) | |
tree | 9e62a7cc3242c2cac01a20227ed6b82fa3911a9c /net/base | |
parent | 1e2787f96182fedaf7be62ccf041a8406fa23f8d (diff) | |
download | chromium_src-d155c510094276cf2fdbc3b23d0ceb387e645ac6.zip chromium_src-d155c510094276cf2fdbc3b23d0ceb387e645ac6.tar.gz chromium_src-d155c510094276cf2fdbc3b23d0ceb387e645ac6.tar.bz2 |
Fix some coverity warnings in src/net.
Review URL: http://codereview.chromium.org/155315
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/sdch_manager.cc | 8 | ||||
-rw-r--r-- | net/base/sdch_manager.h | 8 |
2 files changed, 8 insertions, 8 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 |