diff options
author | jschuh@google.com <jschuh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 19:29:41 +0000 |
---|---|---|
committer | jschuh@google.com <jschuh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 19:29:41 +0000 |
commit | 13c340e130d5fa54b3abe5f3001bda94d4569009 (patch) | |
tree | c52af4b32d11fc2be00340e867ea155648b03fbc /net/base/dns_util.h | |
parent | c3df17c94b05b3a22b6755b93dc68bcca9c010f7 (diff) | |
download | chromium_src-13c340e130d5fa54b3abe5f3001bda94d4569009.zip chromium_src-13c340e130d5fa54b3abe5f3001bda94d4569009.tar.gz chromium_src-13c340e130d5fa54b3abe5f3001bda94d4569009.tar.bz2 |
Correctly handle trailing dots in hostname blacklist.
Submitted for inferno@chromium.org
BUG=35510
TEST=HostContentSettingsMapTest.HostTrimEndingDotCheck
Review URL: http://codereview.chromium.org/669284
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/dns_util.h')
-rw-r--r-- | net/base/dns_util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/base/dns_util.h b/net/base/dns_util.h index 8eb98f2..f0d2051 100644 --- a/net/base/dns_util.h +++ b/net/base/dns_util.h @@ -20,6 +20,9 @@ bool DNSDomainFromDot(const std::string& dotted, std::string* out); // characters as given in RFC 3490, 4.1, 3(a) bool IsSTD3ASCIIValidCharacter(char c); +// Returns the hostname by trimming the ending dot, if one exists. +std::string TrimEndingDot(const std::string& host); + } // namespace net #endif // NET_BASE_DNS_UTIL_H_ |