Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: base/hash.h

Issue 10920026: Move hash.h/cc from net/disk_cache to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan, rvargas feedback Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base.gypi ('k') | base/hash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/hash.h
diff --git a/net/disk_cache/hash.h b/base/hash.h
similarity index 70%
rename from net/disk_cache/hash.h
rename to base/hash.h
index 414a3694ccafc2149145a5248639424606cdcb21..cf8ea3a26e49475a9187d7005cc17b0f470609f6 100644
--- a/net/disk_cache/hash.h
+++ b/base/hash.h
@@ -2,19 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_HASH_H__
-#define NET_DISK_CACHE_HASH_H__
+#ifndef BASE_HASH_H_
+#define BASE_HASH_H_
#include <string>
+#include "base/base_export.h"
#include "base/basictypes.h"
-#include "net/base/net_export.h"
-namespace disk_cache {
+namespace base {
// From http://www.azillionmonkeys.com/qed/hash.html
// This is the hash used on WebCore/platform/stringhash
-NET_EXPORT_PRIVATE uint32 SuperFastHash(const char * data, int len);
+BASE_EXPORT uint32 SuperFastHash(const char * data, int len);
inline uint32 Hash(const char* key, size_t length) {
return SuperFastHash(key, static_cast<int>(length));
@@ -26,6 +26,6 @@ inline uint32 Hash(const std::string& key) {
return SuperFastHash(key.data(), static_cast<int>(key.size()));
}
-} // namespace disk_cache
+} // namespace base
-#endif // NET_DISK_CACHE_HASH_H__
+#endif // BASE_HASH_H_
« no previous file with comments | « base/base.gypi ('k') | base/hash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698