license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 1 | // Copyright (c) 2006-2008 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. | ||||
[email protected] | 408d35f5 | 2008-08-13 18:30:22 | [diff] [blame] | 4 | |
5 | #ifndef NET_DISK_CACHE_CACHE_UTIL_H_ | ||||
6 | #define NET_DISK_CACHE_CACHE_UTIL_H_ | ||||
7 | |||||
8 | #include <string> | ||||
9 | |||||
10 | #include "base/basictypes.h" | ||||
11 | |||||
[email protected] | cfaa1f2 | 2009-10-12 17:14:59 | [diff] [blame^] | 12 | class FilePath; |
13 | |||||
[email protected] | 408d35f5 | 2008-08-13 18:30:22 | [diff] [blame] | 14 | namespace disk_cache { |
15 | |||||
[email protected] | 408d35f5 | 2008-08-13 18:30:22 | [diff] [blame] | 16 | // Moves the cache files from the given path to another location. |
17 | // Returns true if successful, false otherwise. | ||||
[email protected] | cfaa1f2 | 2009-10-12 17:14:59 | [diff] [blame^] | 18 | bool MoveCache(const FilePath& from_path, const FilePath& to_path); |
[email protected] | 408d35f5 | 2008-08-13 18:30:22 | [diff] [blame] | 19 | |
20 | // Deletes the cache files stored on |path|, and optionally also attempts to | ||||
21 | // delete the folder itself. | ||||
[email protected] | cfaa1f2 | 2009-10-12 17:14:59 | [diff] [blame^] | 22 | void DeleteCache(const FilePath& path, bool remove_folder); |
23 | // Deprecated. | ||||
[email protected] | 408d35f5 | 2008-08-13 18:30:22 | [diff] [blame] | 24 | void DeleteCache(const std::wstring& path, bool remove_folder); |
25 | |||||
[email protected] | a88d601f | 2008-08-15 20:36:21 | [diff] [blame] | 26 | // Deletes a cache file. |
[email protected] | cfaa1f2 | 2009-10-12 17:14:59 | [diff] [blame^] | 27 | bool DeleteCacheFile(const FilePath& name); |
28 | // Deprecated. | ||||
[email protected] | a88d601f | 2008-08-15 20:36:21 | [diff] [blame] | 29 | bool DeleteCacheFile(const std::wstring& name); |
30 | |||||
[email protected] | 408d35f5 | 2008-08-13 18:30:22 | [diff] [blame] | 31 | } // namespace disk_cache |
32 | |||||
33 | #endif // NET_DISK_CACHE_CACHE_UTIL_H_ |