chromium/chrome/utility/image_writer/image_writer.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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 {

// Since block devices like large sequential access and IPC is expensive we're
// doing work in 1MB chunks.
const int kBurningBlockSize =;  // 1 MB
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() {}

}  // namespace image_writer