#include "extensions/common/api/sockets_tcp.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 sockets_tcp {
SocketProperties::SocketProperties()
{ … }
SocketProperties::~SocketProperties() = default;
SocketProperties::SocketProperties(SocketProperties&& rhs) noexcept = default;
SocketProperties& SocketProperties::operator=(SocketProperties&& rhs) noexcept = default;
SocketProperties SocketProperties::Clone() const { … }
bool SocketProperties::Populate(
const base::Value::Dict& dict, SocketProperties& out) { … }
bool SocketProperties::Populate(
const base::Value& value, SocketProperties& out) { … }
std::optional<SocketProperties> SocketProperties::FromValue(const base::Value::Dict& value) { … }
std::optional<SocketProperties> SocketProperties::FromValue(const base::Value& value) { … }
base::Value::Dict SocketProperties::ToValue() const { … }
CreateInfo::CreateInfo()
: … { … }
CreateInfo::~CreateInfo() = default;
CreateInfo::CreateInfo(CreateInfo&& rhs) noexcept = default;
CreateInfo& CreateInfo::operator=(CreateInfo&& rhs) noexcept = default;
CreateInfo CreateInfo::Clone() const { … }
bool CreateInfo::Populate(
const base::Value::Dict& dict, CreateInfo& out) { … }
bool CreateInfo::Populate(
const base::Value& value, CreateInfo& out) { … }
std::optional<CreateInfo> CreateInfo::FromValue(const base::Value::Dict& value) { … }
std::optional<CreateInfo> CreateInfo::FromValue(const base::Value& value) { … }
base::Value::Dict CreateInfo::ToValue() const { … }
const char* ToString(DnsQueryType enum_param) { … }
DnsQueryType ParseDnsQueryType(std::string_view enum_string) { … }
std::u16string GetDnsQueryTypeParseError(std::string_view enum_string) { … }
SendInfo::SendInfo()
: … { … }
SendInfo::~SendInfo() = default;
SendInfo::SendInfo(SendInfo&& rhs) noexcept = default;
SendInfo& SendInfo::operator=(SendInfo&& rhs) noexcept = default;
SendInfo SendInfo::Clone() const { … }
bool SendInfo::Populate(
const base::Value::Dict& dict, SendInfo& out) { … }
bool SendInfo::Populate(
const base::Value& value, SendInfo& out) { … }
std::optional<SendInfo> SendInfo::FromValue(const base::Value::Dict& value) { … }
std::optional<SendInfo> SendInfo::FromValue(const base::Value& value) { … }
base::Value::Dict SendInfo::ToValue() const { … }
TLSVersionConstraints::TLSVersionConstraints()
{ … }
TLSVersionConstraints::~TLSVersionConstraints() = default;
TLSVersionConstraints::TLSVersionConstraints(TLSVersionConstraints&& rhs) noexcept = default;
TLSVersionConstraints& TLSVersionConstraints::operator=(TLSVersionConstraints&& rhs) noexcept = default;
TLSVersionConstraints TLSVersionConstraints::Clone() const { … }
bool TLSVersionConstraints::Populate(
const base::Value::Dict& dict, TLSVersionConstraints& out) { … }
bool TLSVersionConstraints::Populate(
const base::Value& value, TLSVersionConstraints& out) { … }
std::optional<TLSVersionConstraints> TLSVersionConstraints::FromValue(const base::Value::Dict& value) { … }
std::optional<TLSVersionConstraints> TLSVersionConstraints::FromValue(const base::Value& value) { … }
base::Value::Dict TLSVersionConstraints::ToValue() const { … }
SecureOptions::SecureOptions()
{ … }
SecureOptions::~SecureOptions() = default;
SecureOptions::SecureOptions(SecureOptions&& rhs) noexcept = default;
SecureOptions& SecureOptions::operator=(SecureOptions&& rhs) noexcept = default;
SecureOptions SecureOptions::Clone() const { … }
bool SecureOptions::Populate(
const base::Value::Dict& dict, SecureOptions& out) { … }
bool SecureOptions::Populate(
const base::Value& value, SecureOptions& out) { … }
std::optional<SecureOptions> SecureOptions::FromValue(const base::Value::Dict& value) { … }
std::optional<SecureOptions> SecureOptions::FromValue(const base::Value& value) { … }
base::Value::Dict SecureOptions::ToValue() const { … }
SocketInfo::SocketInfo()
: … { … }
SocketInfo::~SocketInfo() = default;
SocketInfo::SocketInfo(SocketInfo&& rhs) noexcept = default;
SocketInfo& SocketInfo::operator=(SocketInfo&& rhs) noexcept = default;
SocketInfo SocketInfo::Clone() const { … }
bool SocketInfo::Populate(
const base::Value::Dict& dict, SocketInfo& out) { … }
bool SocketInfo::Populate(
const base::Value& value, SocketInfo& out) { … }
std::optional<SocketInfo> SocketInfo::FromValue(const base::Value::Dict& value) { … }
std::optional<SocketInfo> SocketInfo::FromValue(const base::Value& value) { … }
base::Value::Dict SocketInfo::ToValue() const { … }
ReceiveInfo::ReceiveInfo()
: … { … }
ReceiveInfo::~ReceiveInfo() = default;
ReceiveInfo::ReceiveInfo(ReceiveInfo&& rhs) noexcept = default;
ReceiveInfo& ReceiveInfo::operator=(ReceiveInfo&& rhs) noexcept = default;
ReceiveInfo ReceiveInfo::Clone() const { … }
bool ReceiveInfo::Populate(
const base::Value::Dict& dict, ReceiveInfo& out) { … }
bool ReceiveInfo::Populate(
const base::Value& value, ReceiveInfo& out) { … }
std::optional<ReceiveInfo> ReceiveInfo::FromValue(const base::Value::Dict& value) { … }
std::optional<ReceiveInfo> ReceiveInfo::FromValue(const base::Value& value) { … }
base::Value::Dict ReceiveInfo::ToValue() const { … }
ReceiveErrorInfo::ReceiveErrorInfo()
: … { … }
ReceiveErrorInfo::~ReceiveErrorInfo() = default;
ReceiveErrorInfo::ReceiveErrorInfo(ReceiveErrorInfo&& rhs) noexcept = default;
ReceiveErrorInfo& ReceiveErrorInfo::operator=(ReceiveErrorInfo&& rhs) noexcept = default;
ReceiveErrorInfo ReceiveErrorInfo::Clone() const { … }
bool ReceiveErrorInfo::Populate(
const base::Value::Dict& dict, ReceiveErrorInfo& out) { … }
bool ReceiveErrorInfo::Populate(
const base::Value& value, ReceiveErrorInfo& out) { … }
std::optional<ReceiveErrorInfo> ReceiveErrorInfo::FromValue(const base::Value::Dict& value) { … }
std::optional<ReceiveErrorInfo> ReceiveErrorInfo::FromValue(const base::Value& value) { … }
base::Value::Dict ReceiveErrorInfo::ToValue() const { … }
namespace Create {
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 CreateInfo& create_info) { … }
}
namespace Update {
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 SetPaused {
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 SetKeepAlive {
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(int result) { … }
}
namespace SetNoDelay {
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(int result) { … }
}
namespace Connect {
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(int result) { … }
}
namespace Disconnect {
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 Secure {
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(int result) { … }
}
namespace Send {
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 SendInfo& send_info) { … }
}
namespace Close {
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 GetInfo {
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 SocketInfo& socket_info) { … }
}
namespace GetSockets {
base::Value::List Results::Create(const std::vector<SocketInfo>& socket_infos) { … }
}
namespace OnReceive {
const char kEventName[] = …;
base::Value::List Create(const ReceiveInfo& info) { … }
}
namespace OnReceiveError {
const char kEventName[] = …;
base::Value::List Create(const ReceiveErrorInfo& info) { … }
}
}
}
}