chromium/net/disk_cache/blockfile/file_posix.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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() {}

// Static.
void File::WaitForPendingIOForTesting(int* num_pending_io) {}

// Static.
void File::DropPendingIO() {}

File::~File() = default;

base::PlatformFile File::platform_file() const {}

// Runs on a worker thread.
int File::DoRead(void* buffer, size_t buffer_len, size_t offset) {}

// Runs on a worker thread.
int File::DoWrite(const void* buffer, size_t buffer_len, size_t offset) {}

// This method actually makes sure that the last reference to the file doesn't
// go away on the worker pool.
void File::OnOperationComplete(FileIOCallback* callback, int result) {}

}  // namespace disk_cache