Updating trunk VERSION from 1010.0 to 1011.0
[chromium-blink-merge.git] / net / disk_cache / cache_util.h
blob108f0b761afb2d45c1ea1f2d1d3620f65edce09a
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
3 // found in the LICENSE file.
5 #ifndef NET_DISK_CACHE_CACHE_UTIL_H_
6 #define NET_DISK_CACHE_CACHE_UTIL_H_
7 #pragma once
9 #include "base/basictypes.h"
10 #include "net/base/net_export.h"
12 class FilePath;
14 namespace disk_cache {
16 // Moves the cache files from the given path to another location.
17 // Fails if the destination exists already, or if it doesn't have
18 // permission for the operation. This is basically a rename operation
19 // for the cache directory. Returns true if successful. On ChromeOS,
20 // this moves the cache contents, and leaves the empty cache
21 // directory.
22 NET_EXPORT_PRIVATE bool MoveCache(const FilePath& from_path,
23 const FilePath& to_path);
25 // Deletes the cache files stored on |path|, and optionally also attempts to
26 // delete the folder itself.
27 NET_EXPORT_PRIVATE void DeleteCache(const FilePath& path, bool remove_folder);
29 // Deletes a cache file.
30 NET_EXPORT_PRIVATE bool DeleteCacheFile(const FilePath& name);
32 } // namespace disk_cache
34 #endif // NET_DISK_CACHE_CACHE_UTIL_H_