#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/utility/image_writer/image_writer.h"
#include <string.h>
#include "base/containers/heap_array.h"
#include "base/location.h"
#include "base/memory/aligned_memory.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "chrome/utility/image_writer/error_message_strings.h"
#include "chrome/utility/image_writer/image_writer_handler.h"
#include "content/public/utility/utility_thread.h"
#if BUILDFLAG(IS_MAC)
#include "chrome/utility/image_writer/disk_unmounter_mac.h"
#endif
namespace image_writer {
const int kBurningBlockSize = …;
const int kMemoryAlignment = …;
ImageWriter::ImageWriter(ImageWriterHandler* handler,
const base::FilePath& image_path,
const base::FilePath& device_path)
: … { … }
ImageWriter::~ImageWriter() { … }
void ImageWriter::Write() { … }
void ImageWriter::Verify() { … }
void ImageWriter::Cancel() { … }
bool ImageWriter::IsRunning() const { … }
const base::FilePath& ImageWriter::GetImagePath() { … }
const base::FilePath& ImageWriter::GetDevicePath() { … }
void ImageWriter::PostTask(base::OnceClosure task) { … }
void ImageWriter::PostProgress(int64_t progress) { … }
void ImageWriter::Error(const std::string& message) { … }
bool ImageWriter::InitializeFiles() { … }
void ImageWriter::WriteChunk() { … }
void ImageWriter::VerifyChunk() { … }
}