#include "mojo/public/cpp/system/file_data_source.h"
#include <algorithm>
#include <limits>
#include "base/numerics/safe_conversions.h"
namespace mojo {
namespace {
uint64_t CalculateEndOffset(base::File* file, MojoResult* result) { … }
}
MojoResult FileDataSource::ConvertFileErrorToMojoResult(
base::File::Error error) { … }
FileDataSource::FileDataSource(base::File file)
: … { … }
FileDataSource::~FileDataSource() = default;
void FileDataSource::SetRange(uint64_t start, uint64_t end) { … }
uint64_t FileDataSource::GetLength() const { … }
DataPipeProducer::DataSource::ReadResult FileDataSource::Read(
uint64_t offset,
base::span<char> buffer) { … }
}