#include "chrome/common/extensions/api/image_writer_private.h"
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "tools/json_schema_compiler/util.h"
#include <string_view>
UTF8ToUTF16;
namespace extensions {
namespace api {
namespace image_writer_private {
const char* ToString(Stage enum_param) { … }
Stage ParseStage(std::string_view enum_string) { … }
std::u16string GetStageParseError(std::string_view enum_string) { … }
UrlWriteOptions::UrlWriteOptions()
{ … }
UrlWriteOptions::~UrlWriteOptions() = default;
UrlWriteOptions::UrlWriteOptions(UrlWriteOptions&& rhs) noexcept = default;
UrlWriteOptions& UrlWriteOptions::operator=(UrlWriteOptions&& rhs) noexcept = default;
UrlWriteOptions UrlWriteOptions::Clone() const { … }
bool UrlWriteOptions::Populate(
const base::Value::Dict& dict, UrlWriteOptions& out) { … }
bool UrlWriteOptions::Populate(
const base::Value& value, UrlWriteOptions& out) { … }
std::optional<UrlWriteOptions> UrlWriteOptions::FromValue(const base::Value::Dict& value) { … }
std::optional<UrlWriteOptions> UrlWriteOptions::FromValue(const base::Value& value) { … }
base::Value::Dict UrlWriteOptions::ToValue() const { … }
ProgressInfo::ProgressInfo()
: … { … }
ProgressInfo::~ProgressInfo() = default;
ProgressInfo::ProgressInfo(ProgressInfo&& rhs) noexcept = default;
ProgressInfo& ProgressInfo::operator=(ProgressInfo&& rhs) noexcept = default;
ProgressInfo ProgressInfo::Clone() const { … }
bool ProgressInfo::Populate(
const base::Value::Dict& dict, ProgressInfo& out) { … }
bool ProgressInfo::Populate(
const base::Value& value, ProgressInfo& out) { … }
std::optional<ProgressInfo> ProgressInfo::FromValue(const base::Value::Dict& value) { … }
std::optional<ProgressInfo> ProgressInfo::FromValue(const base::Value& value) { … }
base::Value::Dict ProgressInfo::ToValue() const { … }
RemovableStorageDevice::RemovableStorageDevice()
: … { … }
RemovableStorageDevice::~RemovableStorageDevice() = default;
RemovableStorageDevice::RemovableStorageDevice(RemovableStorageDevice&& rhs) noexcept = default;
RemovableStorageDevice& RemovableStorageDevice::operator=(RemovableStorageDevice&& rhs) noexcept = default;
RemovableStorageDevice RemovableStorageDevice::Clone() const { … }
bool RemovableStorageDevice::Populate(
const base::Value::Dict& dict, RemovableStorageDevice& out) { … }
bool RemovableStorageDevice::Populate(
const base::Value& value, RemovableStorageDevice& out) { … }
std::optional<RemovableStorageDevice> RemovableStorageDevice::FromValue(const base::Value::Dict& value) { … }
std::optional<RemovableStorageDevice> RemovableStorageDevice::FromValue(const base::Value& value) { … }
base::Value::Dict RemovableStorageDevice::ToValue() const { … }
namespace WriteFromUrl {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace WriteFromFile {
Params::FileEntry::FileEntry()
{ … }
Params::FileEntry::~FileEntry() = default;
Params::FileEntry::FileEntry(FileEntry&& rhs) noexcept = default;
Params::FileEntry& Params::FileEntry::operator=(FileEntry&& rhs) noexcept = default;
Params::FileEntry Params::FileEntry::Clone() const { … }
bool Params::FileEntry::Populate(
const base::Value::Dict& dict, FileEntry& out) { … }
bool Params::FileEntry::Populate(
const base::Value& value, FileEntry& out) { … }
std::optional<Params::FileEntry> Params::FileEntry::FromValue(const base::Value::Dict& value) { … }
std::optional<Params::FileEntry> Params::FileEntry::FromValue(const base::Value& value) { … }
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace CancelWrite {
base::Value::List Results::Create() { … }
}
namespace DestroyPartitions {
Params::Params() = default;
Params::~Params() = default;
Params::Params(Params&& rhs) noexcept = default;
Params& Params::operator=(Params&& rhs) noexcept = default;
std::optional<Params> Params::Create(const base::Value::List& args) { … }
base::Value::List Results::Create() { … }
}
namespace ListRemovableStorageDevices {
base::Value::List Results::Create(const std::vector<RemovableStorageDevice>& devices) { … }
}
namespace OnWriteProgress {
const char kEventName[] = …;
base::Value::List Create(const ProgressInfo& info) { … }
}
namespace OnWriteComplete {
const char kEventName[] = …;
base::Value::List Create() { … }
}
namespace OnWriteError {
const char kEventName[] = …;
base::Value::List Create(const ProgressInfo& info, const std::string& error) { … }
}
namespace OnDeviceInserted {
const char kEventName[] = …;
base::Value::List Create(const RemovableStorageDevice& device) { … }
}
namespace OnDeviceRemoved {
const char kEventName[] = …;
base::Value::List Create(const RemovableStorageDevice& device) { … }
}
}
}
}