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_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 |
| 12 namespace disk_cache { |
| 13 |
| 14 std::string ConvertEntryHashKeyToHexString(uint64 hash_key); |
| 15 |
| 16 // |key| is the regular HTTP Cache key, which is a URL. |
| 17 // Returns the Hex ascii representation of the uint64 hash_key. |
| 18 std::string GetEntryHashKeyAsHexString(const std::string& key); |
| 19 |
| 20 // |key| is the regular HTTP Cache key, which is a URL. |
| 21 // Returns the hash of the key as uint64. |
| 22 uint64 GetEntryHashKey(const std::string& key); |
| 23 |
| 24 // Parses the |hash_key| string into a uint64 buffer. |
| 25 // |hash_key| string must be of the form: FFFFFFFFFFFFFFFF . |
| 26 bool GetEntryHashKeyFromHexString(const std::string& hash_key, |
| 27 uint64* hash_key_out); |
| 28 |
| 29 } // namespace disk_cache |
| 30 |
| 31 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_UTIL_H_ |
OLD | NEW |