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

Side by Side Diff: net/disk_cache/cache_util.h

Issue 3141: Move GetFreeDiskSpace to SysInfo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/cache_util_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 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 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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 namespace disk_cache { 12 namespace disk_cache {
13 13
14 // Returns the available disk space on the volume that contains |path|
15 // (in bytes), or -1 on failure.
16 int64 GetFreeDiskSpace(const std::wstring& path);
17
18 // Moves the cache files from the given path to another location. 14 // Moves the cache files from the given path to another location.
19 // Returns true if successful, false otherwise. 15 // Returns true if successful, false otherwise.
20 bool MoveCache(const std::wstring& from_path, const std::wstring& to_path); 16 bool MoveCache(const std::wstring& from_path, const std::wstring& to_path);
21 17
22 // Deletes the cache files stored on |path|, and optionally also attempts to 18 // Deletes the cache files stored on |path|, and optionally also attempts to
23 // delete the folder itself. 19 // delete the folder itself.
24 void DeleteCache(const std::wstring& path, bool remove_folder); 20 void DeleteCache(const std::wstring& path, bool remove_folder);
25 21
26 // Deletes a cache file. 22 // Deletes a cache file.
27 bool DeleteCacheFile(const std::wstring& name); 23 bool DeleteCacheFile(const std::wstring& name);
28 24
29 // Blocks until |num_pending_io| IO operations complete. 25 // Blocks until |num_pending_io| IO operations complete.
30 void WaitForPendingIO(int* num_pending_io); 26 void WaitForPendingIO(int* num_pending_io);
31 27
32 } // namespace disk_cache 28 } // namespace disk_cache
33 29
34 #endif // NET_DISK_CACHE_CACHE_UTIL_H_ 30 #endif // NET_DISK_CACHE_CACHE_UTIL_H_
35 31
OLDNEW
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/cache_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698