#include "net/disk_cache/cache_util.h"
#include <limits>
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/safe_base_name.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/metrics/field_trial_params.h"
#include "base/numerics/clamped_math.h"
#include "base/numerics/ostream_operators.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/bind_post_task.h"
#include "base/task/thread_pool.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
namespace {
const int kMaxOldFolders = …;
base::FilePath GetPrefixedName(const base::FilePath& path,
const base::SafeBaseName& basename,
int index) { … }
base::FilePath GetTempCacheName(const base::FilePath& dirname,
const base::SafeBaseName& basename) { … }
void CleanupTemporaryDirectories(const base::FilePath& path) { … }
bool MoveDirectoryToTemporaryDirectory(const base::FilePath& path) { … }
bool CleanupDirectoryInternal(const base::FilePath& path) { … }
int64_t PreferredCacheSizeInternal(int64_t available) { … }
}
namespace disk_cache {
const int kDefaultCacheSize = …;
BASE_FEATURE(…);
void DeleteCache(const base::FilePath& path, bool remove_folder) { … }
void CleanupDirectory(const base::FilePath& path,
base::OnceCallback<void(bool)> callback) { … }
bool CleanupDirectorySync(const base::FilePath& path) { … }
int PreferredCacheSize(int64_t available, net::CacheType type) { … }
}