OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_UTIL_H_ | |
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_UTIL_H_ | |
gavinp
2013/04/15 15:40:54
Let's just move these into simple_util.h; if we ne
| |
7 | |
8 #include <string> | |
9 | |
10 #include "base/basictypes.h" | |
11 | |
12 namespace base { | |
13 class Time; | |
14 } | |
15 | |
16 namespace disk_cache { | |
17 | |
18 // Size of the uint64 hash_key number in Hex format in a string. | |
19 const size_t kEntryHashKeyAsHexStringSize = 2 * sizeof(uint64); | |
20 | |
21 std::string ConvertEntryHashKeyToHexString(uint64 hash_key); | |
22 | |
23 // |key| is the regular HTTP Cache key, which is a URL. | |
24 // Returns the Hex ascii representation of the uint64 hash_key. | |
25 std::string GetEntryHashKeyAsHexString(const std::string& key); | |
26 | |
27 // |key| is the regular HTTP Cache key, which is a URL. | |
28 // Returns the hash of the key as uint64. | |
29 uint64 GetEntryHashKey(const std::string& key); | |
30 | |
31 // Parses the |hash_key| string into a uint64 buffer. | |
32 // |hash_key| string must be of the form: FFFFFFFFFFFFFFFF . | |
33 bool GetEntryHashKeyFromHexString(const std::string& hash_key, | |
34 uint64* hash_key_out); | |
35 | |
36 } // namespace disk_cache | |
37 | |
38 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_UTIL_H_ | |
OLD | NEW |