diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 01:10:46 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-23 01:10:46 +0000 |
commit | b8c1eb454dc4f246c64a6b1b5b472af102e88103 (patch) | |
tree | 6413d1400ee4ade44838ecd530736840d1f4f64b /net/base/net_util.cc | |
parent | be2da4de5227f4f1cbb8455a58045c5e51076474 (diff) | |
download | chromium_src-b8c1eb454dc4f246c64a6b1b5b472af102e88103.zip chromium_src-b8c1eb454dc4f246c64a6b1b5b472af102e88103.tar.gz chromium_src-b8c1eb454dc4f246c64a6b1b5b472af102e88103.tar.bz2 |
base: Add IsHexDigit function to string_util.h
Removed duplicated IsHex functions and converted the callers along the way.
(Note: this was a TODO for jungshik).
BUG=None
TEST=trybots
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Review URL: http://codereview.chromium.org/2870058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_util.cc')
-rw-r--r-- | net/base/net_util.cc | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/net/base/net_util.cc b/net/base/net_util.cc index c7b6a6f..d521439 100644 --- a/net/base/net_util.cc +++ b/net/base/net_util.cc @@ -184,13 +184,6 @@ STR GetSpecificHeaderT(const STR& headers, const STR& name) { return ret; } -// TODO(jungshik): We have almost identical hex-decoding code else where. -// Consider refactoring and moving it somewhere(base?). Bug 1224311 -inline bool IsHexDigit(unsigned char c) { - return (('0' <= c && c <= '9') || ('A' <= c && c <= 'F') || - ('a' <= c && c <= 'f')); -} - inline unsigned char HexToInt(unsigned char c) { DCHECK(IsHexDigit(c)); static unsigned char kOffset[4] = {0, 0x30u, 0x37u, 0x57u}; |