OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_DISK_CACHE_CACHE_UTIL_H_ | 5 #ifndef NET_DISK_CACHE_CACHE_UTIL_H_ |
6 #define NET_DISK_CACHE_CACHE_UTIL_H_ | 6 #define NET_DISK_CACHE_CACHE_UTIL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
9 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
10 #include "net/disk_cache/disk_cache.h" | 11 #include "net/disk_cache/disk_cache.h" |
11 | 12 |
12 namespace base { | 13 namespace base { |
13 class FilePath; | 14 class FilePath; |
14 } | 15 } |
15 | 16 |
16 namespace disk_cache { | 17 namespace disk_cache { |
17 | 18 |
18 // Moves the cache files from the given path to another location. | 19 // Moves the cache files from the given path to another location. |
(...skipping 11 matching lines...) Expand all Loading... |
30 bool remove_folder); | 31 bool remove_folder); |
31 | 32 |
32 // Deletes a cache file. | 33 // Deletes a cache file. |
33 NET_EXPORT_PRIVATE bool DeleteCacheFile(const base::FilePath& name); | 34 NET_EXPORT_PRIVATE bool DeleteCacheFile(const base::FilePath& name); |
34 | 35 |
35 // Renames cache directory synchronously and fires off a background cleanup | 36 // Renames cache directory synchronously and fires off a background cleanup |
36 // task. Used by cache creator itself or by backends for self-restart on error. | 37 // task. Used by cache creator itself or by backends for self-restart on error. |
37 bool DelayedCacheCleanup(const base::FilePath& full_path); | 38 bool DelayedCacheCleanup(const base::FilePath& full_path); |
38 | 39 |
39 // Returns the preferred max cache size given the available disk space. | 40 // Returns the preferred max cache size given the available disk space. |
40 NET_EXPORT_PRIVATE int PreferredCacheSize(int64 available); | 41 NET_EXPORT_PRIVATE int PreferredCacheSize(int64_t available); |
41 | 42 |
42 // The default cache size should not ideally be exposed, but the blockfile | 43 // The default cache size should not ideally be exposed, but the blockfile |
43 // backend uses it for reasons that include testing. | 44 // backend uses it for reasons that include testing. |
44 NET_EXPORT_PRIVATE extern const int kDefaultCacheSize; | 45 NET_EXPORT_PRIVATE extern const int kDefaultCacheSize; |
45 | 46 |
46 } // namespace disk_cache | 47 } // namespace disk_cache |
47 | 48 |
48 #endif // NET_DISK_CACHE_CACHE_UTIL_H_ | 49 #endif // NET_DISK_CACHE_CACHE_UTIL_H_ |
OLD | NEW |