#include "net/disk_cache/blockfile/file.h"
#include <stdint.h>
#include <limits>
#include <utility>
#include "base/check.h"
#include "base/compiler_specific.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/task/thread_pool.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "net/base/net_errors.h"
#include "net/disk_cache/disk_cache.h"
namespace disk_cache {
File::File(base::File file)
: … { … }
bool File::Init(const base::FilePath& name) { … }
bool File::IsValid() const { … }
bool File::Read(void* buffer, size_t buffer_len, size_t offset) { … }
bool File::Write(const void* buffer, size_t buffer_len, size_t offset) { … }
bool File::Read(void* buffer, size_t buffer_len, size_t offset,
FileIOCallback* callback, bool* completed) { … }
bool File::Write(const void* buffer, size_t buffer_len, size_t offset,
FileIOCallback* callback, bool* completed) { … }
bool File::SetLength(size_t length) { … }
size_t File::GetLength() { … }
void File::WaitForPendingIOForTesting(int* num_pending_io) { … }
void File::DropPendingIO() { … }
File::~File() = default;
base::PlatformFile File::platform_file() const { … }
int File::DoRead(void* buffer, size_t buffer_len, size_t offset) { … }
int File::DoWrite(const void* buffer, size_t buffer_len, size_t offset) { … }
void File::OnOperationComplete(FileIOCallback* callback, int result) { … }
}