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

Side by Side Diff: net/disk_cache/simple/simple_index_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: Philippe's comments 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698