#include "storage/browser/file_system/sandbox_file_stream_reader.h"
#include <stdint.h>
#include <utility>
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/file_stream.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "storage/browser/file_system/file_system_context.h"
#include "storage/browser/file_system/file_system_operation_runner.h"
#include "storage/browser/file_system/memory_file_stream_reader.h"
#include "storage/browser/file_system/obfuscated_file_util_memory_delegate.h"
#include "storage/browser/file_system/sandbox_file_system_backend_delegate.h"
namespace storage {
SandboxFileStreamReader::SandboxFileStreamReader(
FileSystemContext* file_system_context,
const FileSystemURL& url,
int64_t initial_offset,
const base::Time& expected_modification_time)
: … { … }
SandboxFileStreamReader::~SandboxFileStreamReader() = default;
int SandboxFileStreamReader::Read(net::IOBuffer* buf,
int buf_len,
net::CompletionOnceCallback callback) { … }
int64_t SandboxFileStreamReader::GetLength(
net::Int64CompletionOnceCallback callback) { … }
int SandboxFileStreamReader::CreateSnapshot(SnapshotCallback callback) { … }
void SandboxFileStreamReader::DidCreateSnapshotForRead(
net::IOBuffer* read_buf,
int read_len,
net::CompletionOnceCallback callback,
base::File::Error file_error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
scoped_refptr<ShareableFileReference> file_ref) { … }
void SandboxFileStreamReader::DidCreateSnapshotForGetLength(
net::Int64CompletionOnceCallback callback,
base::File::Error file_error,
const base::File::Info& file_info,
const base::FilePath& platform_path,
scoped_refptr<ShareableFileReference> file_ref) { … }
void SandboxFileStreamReader::CreateFileReader(
const base::FilePath& platform_path) { … }
void SandboxFileStreamReader::OnRead(net::CompletionOnceCallback callback,
int rv) { … }
void SandboxFileStreamReader::OnGetLength(
net::Int64CompletionOnceCallback callback,
int64_t rv) { … }
}