#include "services/network/disk_cache/mojo_backend_file_operations.h"
#include "base/task/sequenced_task_runner.h"
namespace network {
namespace {
class FileEnumeratorImpl final
: public disk_cache::BackendFileOperations::FileEnumerator { … };
}
MojoBackendFileOperations::MojoBackendFileOperations(
mojo::PendingRemote<mojom::HttpCacheBackendFileOperations> pending_remote,
scoped_refptr<base::SequencedTaskRunner> task_runner)
: … { … }
MojoBackendFileOperations::~MojoBackendFileOperations() = default;
bool MojoBackendFileOperations::CreateDirectory(const base::FilePath& path) { … }
bool MojoBackendFileOperations::PathExists(const base::FilePath& path) { … }
bool MojoBackendFileOperations::DirectoryExists(const base::FilePath& path) { … }
base::File MojoBackendFileOperations::OpenFile(const base::FilePath& path,
uint32_t flags) { … }
bool MojoBackendFileOperations::DeleteFile(const base::FilePath& path,
DeleteFileMode mode) { … }
bool MojoBackendFileOperations::ReplaceFile(const base::FilePath& from_path,
const base::FilePath& to_path,
base::File::Error* error_out) { … }
std::optional<base::File::Info> MojoBackendFileOperations::GetFileInfo(
const base::FilePath& path) { … }
std::unique_ptr<disk_cache::BackendFileOperations::FileEnumerator>
MojoBackendFileOperations::EnumerateFiles(const base::FilePath& path) { … }
void MojoBackendFileOperations::CleanupDirectory(
const base::FilePath& path,
base::OnceCallback<void(bool)> callback) { … }
std::unique_ptr<disk_cache::UnboundBackendFileOperations>
MojoBackendFileOperations::Unbind() { … }
UnboundMojoBackendFileOperations::UnboundMojoBackendFileOperations(
mojo::PendingRemote<mojom::HttpCacheBackendFileOperations> pending_remote)
: … { … }
UnboundMojoBackendFileOperations::~UnboundMojoBackendFileOperations() = default;
std::unique_ptr<disk_cache::BackendFileOperations>
UnboundMojoBackendFileOperations::Bind(
scoped_refptr<base::SequencedTaskRunner> task_runner) { … }
}