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

Unified Diff: net/disk_cache/simple/simple_util.h

Issue 14263005: Refactor our SimpleIndex file format and serialization to use Pickle instead of the previously bugg… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 years, 8 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
Index: net/disk_cache/simple/simple_util.h
diff --git a/net/disk_cache/simple/simple_util.h b/net/disk_cache/simple/simple_util.h
index 0b846608ebfe8e351177fc30c732804f312d7c68..579dbcf1754f66b710d6405d2534bdadec704f10 100644
--- a/net/disk_cache/simple/simple_util.h
+++ b/net/disk_cache/simple/simple_util.h
@@ -14,6 +14,21 @@ namespace disk_cache {
namespace simple_util {
+std::string ConvertEntryHashKeyToHexString(uint64 hash_key);
+
+// |key| is the regular HTTP Cache key, which is a URL.
+// Returns the Hex ascii representation of the uint64 hash_key.
+std::string GetEntryHashKeyAsHexString(const std::string& key);
+
+// |key| is the regular HTTP Cache key, which is a URL.
+// Returns the hash of the key as uint64.
+uint64 GetEntryHashKey(const std::string& key);
+
+// Parses the |hash_key| string into a uint64 buffer.
+// |hash_key| string must be of the form: FFFFFFFFFFFFFFFF .
+bool GetEntryHashKeyFromHexString(const std::string& hash_key,
+ uint64* hash_key_out);
+
// Given a |key| for a (potential) entry in the simple backend and the |index|
// of a stream on that entry, returns the filename in which that stream would be
// stored.

Powered by Google App Engine
This is Rietveld 408576698