#include "extensions/common/api/file_system.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 file_system {
AcceptOption::AcceptOption()
{ … }
AcceptOption::~AcceptOption() = default;
AcceptOption::AcceptOption(AcceptOption&& rhs) noexcept = default;
AcceptOption& AcceptOption::operator=(AcceptOption&& rhs) noexcept = default;
AcceptOption AcceptOption::Clone() const { … }
bool AcceptOption::Populate(
const base::Value::Dict& dict, AcceptOption& out) { … }
bool AcceptOption::Populate(
const base::Value& value, AcceptOption& out) { … }
std::optional<AcceptOption> AcceptOption::FromValue(const base::Value::Dict& value) { … }
std::optional<AcceptOption> AcceptOption::FromValue(const base::Value& value) { … }
base::Value::Dict AcceptOption::ToValue() const { … }
const char* ToString(ChooseEntryType enum_param) { … }
ChooseEntryType ParseChooseEntryType(std::string_view enum_string) { … }
std::u16string GetChooseEntryTypeParseError(std::string_view enum_string) { … }
ChooseEntryOptions::ChooseEntryOptions()
: … { … }
ChooseEntryOptions::~ChooseEntryOptions() = default;
ChooseEntryOptions::ChooseEntryOptions(ChooseEntryOptions&& rhs) noexcept = default;
ChooseEntryOptions& ChooseEntryOptions::operator=(ChooseEntryOptions&& rhs) noexcept = default;
ChooseEntryOptions ChooseEntryOptions::Clone() const { … }
bool ChooseEntryOptions::Populate(
const base::Value::Dict& dict, ChooseEntryOptions& out) { … }
bool ChooseEntryOptions::Populate(
const base::Value& value, ChooseEntryOptions& out) { … }
std::optional<ChooseEntryOptions> ChooseEntryOptions::FromValue(const base::Value::Dict& value) { … }
std::optional<ChooseEntryOptions> ChooseEntryOptions::FromValue(const base::Value& value) { … }
base::Value::Dict ChooseEntryOptions::ToValue() const { … }
RequestFileSystemOptions::RequestFileSystemOptions()
{ … }
RequestFileSystemOptions::~RequestFileSystemOptions() = default;
RequestFileSystemOptions::RequestFileSystemOptions(RequestFileSystemOptions&& rhs) noexcept = default;
RequestFileSystemOptions& RequestFileSystemOptions::operator=(RequestFileSystemOptions&& rhs) noexcept = default;
RequestFileSystemOptions RequestFileSystemOptions::Clone() const { … }
bool RequestFileSystemOptions::Populate(
const base::Value::Dict& dict, RequestFileSystemOptions& out) { … }
bool RequestFileSystemOptions::Populate(
const base::Value& value, RequestFileSystemOptions& out) { … }
std::optional<RequestFileSystemOptions> RequestFileSystemOptions::FromValue(const base::Value::Dict& value) { … }
std::optional<RequestFileSystemOptions> RequestFileSystemOptions::FromValue(const base::Value& value) { … }
base::Value::Dict RequestFileSystemOptions::ToValue() const { … }
Volume::Volume()
: … { … }
Volume::~Volume() = default;
Volume::Volume(Volume&& rhs) noexcept = default;
Volume& Volume::operator=(Volume&& rhs) noexcept = default;
Volume Volume::Clone() const { … }
bool Volume::Populate(
const base::Value::Dict& dict, Volume& out) { … }
bool Volume::Populate(
const base::Value& value, Volume& out) { … }
std::optional<Volume> Volume::FromValue(const base::Value::Dict& value) { … }
std::optional<Volume> Volume::FromValue(const base::Value& value) { … }
base::Value::Dict Volume::ToValue() const { … }
VolumeListChangedEvent::VolumeListChangedEvent()
{ … }
VolumeListChangedEvent::~VolumeListChangedEvent() = default;
VolumeListChangedEvent::VolumeListChangedEvent(VolumeListChangedEvent&& rhs) noexcept = default;
VolumeListChangedEvent& VolumeListChangedEvent::operator=(VolumeListChangedEvent&& rhs) noexcept = default;
VolumeListChangedEvent VolumeListChangedEvent::Clone() const { … }
bool VolumeListChangedEvent::Populate(
const base::Value::Dict& dict, VolumeListChangedEvent& out) { … }
bool VolumeListChangedEvent::Populate(
const base::Value& value, VolumeListChangedEvent& out) { … }
std::optional<VolumeListChangedEvent> VolumeListChangedEvent::FromValue(const base::Value::Dict& value) { … }
std::optional<VolumeListChangedEvent> VolumeListChangedEvent::FromValue(const base::Value& value) { … }
base::Value::Dict VolumeListChangedEvent::ToValue() const { … }
namespace GetDisplayPath {
Params::Entry::Entry()
{ … }
Params::Entry::~Entry() = default;
Params::Entry::Entry(Entry&& rhs) noexcept = default;
Params::Entry& Params::Entry::operator=(Entry&& rhs) noexcept = default;
Params::Entry Params::Entry::Clone() const { … }
bool Params::Entry::Populate(
const base::Value::Dict& dict, Entry& out) { … }
bool Params::Entry::Populate(
const base::Value& value, Entry& out) { … }
std::optional<Params::Entry> Params::Entry::FromValue(const base::Value::Dict& value) { … }
std::optional<Params::Entry> Params::Entry::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(const std::string& display_path) { … }
}
namespace GetWritableEntry {
Params::Entry::Entry()
{ … }
Params::Entry::~Entry() = default;
Params::Entry::Entry(Entry&& rhs) noexcept = default;
Params::Entry& Params::Entry::operator=(Entry&& rhs) noexcept = default;
Params::Entry Params::Entry::Clone() const { … }
bool Params::Entry::Populate(
const base::Value::Dict& dict, Entry& out) { … }
bool Params::Entry::Populate(
const base::Value& value, Entry& out) { … }
std::optional<Params::Entry> Params::Entry::FromValue(const base::Value::Dict& value) { … }
std::optional<Params::Entry> Params::Entry::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) { … }
Results::Entry::Entry()
{ … }
Results::Entry::~Entry() = default;
Results::Entry::Entry(Entry&& rhs) noexcept = default;
Results::Entry& Results::Entry::operator=(Entry&& rhs) noexcept = default;
base::Value::Dict Results::Entry::ToValue() const { … }
base::Value::List Results::Create(const Entry& entry) { … }
}
namespace IsWritableEntry {
Params::Entry::Entry()
{ … }
Params::Entry::~Entry() = default;
Params::Entry::Entry(Entry&& rhs) noexcept = default;
Params::Entry& Params::Entry::operator=(Entry&& rhs) noexcept = default;
Params::Entry Params::Entry::Clone() const { … }
bool Params::Entry::Populate(
const base::Value::Dict& dict, Entry& out) { … }
bool Params::Entry::Populate(
const base::Value& value, Entry& out) { … }
std::optional<Params::Entry> Params::Entry::FromValue(const base::Value::Dict& value) { … }
std::optional<Params::Entry> Params::Entry::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(bool is_writable) { … }
}
namespace ChooseEntry {
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) { … }
Results::Entry::Entry()
{ … }
Results::Entry::~Entry() = default;
Results::Entry::Entry(Entry&& rhs) noexcept = default;
Results::Entry& Results::Entry::operator=(Entry&& rhs) noexcept = default;
base::Value::Dict Results::Entry::ToValue() const { … }
Results::FileEntriesType::FileEntriesType()
{ … }
Results::FileEntriesType::~FileEntriesType() = default;
Results::FileEntriesType::FileEntriesType(FileEntriesType&& rhs) noexcept = default;
Results::FileEntriesType& Results::FileEntriesType::operator=(FileEntriesType&& rhs) noexcept = default;
base::Value::Dict Results::FileEntriesType::ToValue() const { … }
base::Value::List Results::Create(const Entry& entry, const std::vector<FileEntriesType>& file_entries) { … }
}
namespace RestoreEntry {
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) { … }
Results::Entry::Entry()
{ … }
Results::Entry::~Entry() = default;
Results::Entry::Entry(Entry&& rhs) noexcept = default;
Results::Entry& Results::Entry::operator=(Entry&& rhs) noexcept = default;
base::Value::Dict Results::Entry::ToValue() const { … }
base::Value::List Results::Create(const Entry& entry) { … }
}
namespace IsRestorable {
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(bool is_restorable) { … }
}
namespace RetainEntry {
Params::Entry::Entry()
{ … }
Params::Entry::~Entry() = default;
Params::Entry::Entry(Entry&& rhs) noexcept = default;
Params::Entry& Params::Entry::operator=(Entry&& rhs) noexcept = default;
Params::Entry Params::Entry::Clone() const { … }
bool Params::Entry::Populate(
const base::Value::Dict& dict, Entry& out) { … }
bool Params::Entry::Populate(
const base::Value& value, Entry& out) { … }
std::optional<Params::Entry> Params::Entry::FromValue(const base::Value::Dict& value) { … }
std::optional<Params::Entry> Params::Entry::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) { … }
}
namespace RequestFileSystem {
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) { … }
Results::FileSystem::FileSystem()
{ … }
Results::FileSystem::~FileSystem() = default;
Results::FileSystem::FileSystem(FileSystem&& rhs) noexcept = default;
Results::FileSystem& Results::FileSystem::operator=(FileSystem&& rhs) noexcept = default;
base::Value::Dict Results::FileSystem::ToValue() const { … }
base::Value::List Results::Create(const FileSystem& file_system) { … }
}
namespace GetVolumeList {
base::Value::List Results::Create(const std::vector<Volume>& volumes) { … }
}
namespace OnVolumeListChanged {
const char kEventName[] = …;
base::Value::List Create(const VolumeListChangedEvent& event) { … }
}
}
}
}