diff options
author | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 05:56:59 +0000 |
---|---|---|
committer | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 05:56:59 +0000 |
commit | f1f523f9f9407548b360bb525fc41f4a875c6854 (patch) | |
tree | b2cab568c07528518c0f288c71e2b2ad957b386e /base/hash.cc | |
parent | 855782ce90f8c141f6b9272aa1f9987237804e40 (diff) | |
download | chromium_src-f1f523f9f9407548b360bb525fc41f4a875c6854.zip chromium_src-f1f523f9f9407548b360bb525fc41f4a875c6854.tar.gz chromium_src-f1f523f9f9407548b360bb525fc41f4a875c6854.tar.bz2 |
base::Hash: Minor improvements to documentation and testing.
Renamed the char* argument to 'data' and the string argument to 'str'.
Cleaned up the comments on the char* overload (avoid using
string-specific terms and mentioning null byte). Mentioned that this
algorithm is also in Blink.
Added a test case testing that null bytes cause the hash to change.
BUG=347393
Review URL: https://codereview.chromium.org/182253007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/hash.cc')
-rw-r--r-- | base/hash.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/base/hash.cc b/base/hash.cc index 9088dbd..a7db64a 100644 --- a/base/hash.cc +++ b/base/hash.cc @@ -6,6 +6,7 @@ // Definition in base/third_party/superfasthash/superfasthash.c. (Third-party // code did not come with its own header file, so declaring the function here.) +// Note: This algorithm is also in Blink under Source/wtf/StringHasher.h. extern "C" uint32_t SuperFastHash(const char* data, int len); namespace base { |