#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-params-data.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-shared-message-ids.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-blink-import-headers.h"
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace proxy_resolver::mojom::blink {
ProxyInfo::ProxyInfo()
: … { … }
ProxyInfo::ProxyInfo(
WTF::Vector<::net::ProxyChain> proxy_chains_in)
: … { … }
ProxyInfo::~ProxyInfo() = default;
void ProxyInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ProxyInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char HostResolverRequestClient::Name_[] = …;
HostResolverRequestClient::IPCStableHashFunction HostResolverRequestClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* HostResolverRequestClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t HostResolverRequestClient::ReportResult_Sym::IPCStableHash() { … }
# endif
HostResolverRequestClientProxy::HostResolverRequestClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void HostResolverRequestClientProxy::ReportResult(
int32_t in_error, const WTF::Vector<::net::IPAddress>& in_result) { … }
bool HostResolverRequestClientStubDispatch::Accept(
HostResolverRequestClient* impl,
mojo::Message* message) { … }
bool HostResolverRequestClientStubDispatch::AcceptWithResponder(
HostResolverRequestClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kHostResolverRequestClientValidationInfo[] = …;
bool HostResolverRequestClientRequestValidator::Accept(mojo::Message* message) { … }
const char ProxyResolver::Name_[] = …;
ProxyResolver::IPCStableHashFunction ProxyResolver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ProxyResolver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ProxyResolver::GetProxyForUrl_Sym::IPCStableHash() { … }
# endif
ProxyResolverProxy::ProxyResolverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ProxyResolverProxy::GetProxyForUrl(
const ::blink::KURL& in_url, ::network::mojom::blink::NetworkAnonymizationKeyPtr in_network_anonymization_key, ::mojo::PendingRemote<ProxyResolverRequestClient> in_client) { … }
bool ProxyResolverStubDispatch::Accept(
ProxyResolver* impl,
mojo::Message* message) { … }
bool ProxyResolverStubDispatch::AcceptWithResponder(
ProxyResolver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kProxyResolverValidationInfo[] = …;
bool ProxyResolverRequestValidator::Accept(mojo::Message* message) { … }
const char ProxyResolverRequestClient::Name_[] = …;
ProxyResolverRequestClient::IPCStableHashFunction ProxyResolverRequestClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ProxyResolverRequestClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ProxyResolverRequestClient::ReportResult_Sym::IPCStableHash() { … }
uint32_t ProxyResolverRequestClient::Alert_Sym::IPCStableHash() { … }
uint32_t ProxyResolverRequestClient::OnError_Sym::IPCStableHash() { … }
uint32_t ProxyResolverRequestClient::ResolveDns_Sym::IPCStableHash() { … }
# endif
ProxyResolverRequestClientProxy::ProxyResolverRequestClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ProxyResolverRequestClientProxy::ReportResult(
int32_t in_error, ProxyInfoPtr in_proxy_info) { … }
void ProxyResolverRequestClientProxy::Alert(
const WTF::String& in_error) { … }
void ProxyResolverRequestClientProxy::OnError(
int32_t in_line_number, const WTF::String& in_error) { … }
void ProxyResolverRequestClientProxy::ResolveDns(
const WTF::String& in_host, HostResolveOperation in_operation, ::network::mojom::blink::NetworkAnonymizationKeyPtr in_network_anonymization_key, ::mojo::PendingRemote<HostResolverRequestClient> in_client) { … }
bool ProxyResolverRequestClientStubDispatch::Accept(
ProxyResolverRequestClient* impl,
mojo::Message* message) { … }
bool ProxyResolverRequestClientStubDispatch::AcceptWithResponder(
ProxyResolverRequestClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kProxyResolverRequestClientValidationInfo[] = …;
bool ProxyResolverRequestClientRequestValidator::Accept(mojo::Message* message) { … }
const char ProxyResolverFactory::Name_[] = …;
ProxyResolverFactory::IPCStableHashFunction ProxyResolverFactory::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ProxyResolverFactory::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ProxyResolverFactory::CreateResolver_Sym::IPCStableHash() { … }
# endif
ProxyResolverFactoryProxy::ProxyResolverFactoryProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ProxyResolverFactoryProxy::CreateResolver(
const WTF::String& in_pac_script, ::mojo::PendingReceiver<ProxyResolver> in_receiver, ::mojo::PendingRemote<ProxyResolverFactoryRequestClient> in_client) { … }
bool ProxyResolverFactoryStubDispatch::Accept(
ProxyResolverFactory* impl,
mojo::Message* message) { … }
bool ProxyResolverFactoryStubDispatch::AcceptWithResponder(
ProxyResolverFactory* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kProxyResolverFactoryValidationInfo[] = …;
bool ProxyResolverFactoryRequestValidator::Accept(mojo::Message* message) { … }
const char ProxyResolverFactoryRequestClient::Name_[] = …;
ProxyResolverFactoryRequestClient::IPCStableHashFunction ProxyResolverFactoryRequestClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ProxyResolverFactoryRequestClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ProxyResolverFactoryRequestClient::ReportResult_Sym::IPCStableHash() { … }
uint32_t ProxyResolverFactoryRequestClient::Alert_Sym::IPCStableHash() { … }
uint32_t ProxyResolverFactoryRequestClient::OnError_Sym::IPCStableHash() { … }
uint32_t ProxyResolverFactoryRequestClient::ResolveDns_Sym::IPCStableHash() { … }
# endif
ProxyResolverFactoryRequestClientProxy::ProxyResolverFactoryRequestClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ProxyResolverFactoryRequestClientProxy::ReportResult(
int32_t in_error) { … }
void ProxyResolverFactoryRequestClientProxy::Alert(
const WTF::String& in_error) { … }
void ProxyResolverFactoryRequestClientProxy::OnError(
int32_t in_line_number, const WTF::String& in_error) { … }
void ProxyResolverFactoryRequestClientProxy::ResolveDns(
const WTF::String& in_host, HostResolveOperation in_operation, ::network::mojom::blink::NetworkAnonymizationKeyPtr in_network_anonymization_key, ::mojo::PendingRemote<HostResolverRequestClient> in_client) { … }
bool ProxyResolverFactoryRequestClientStubDispatch::Accept(
ProxyResolverFactoryRequestClient* impl,
mojo::Message* message) { … }
bool ProxyResolverFactoryRequestClientStubDispatch::AcceptWithResponder(
ProxyResolverFactoryRequestClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kProxyResolverFactoryRequestClientValidationInfo[] = …;
bool ProxyResolverFactoryRequestClientRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::proxy_resolver::mojom::blink::ProxyInfo::DataView, ::proxy_resolver::mojom::blink::ProxyInfoPtr>::Read(
::proxy_resolver::mojom::blink::ProxyInfo::DataView input,
::proxy_resolver::mojom::blink::ProxyInfoPtr* output) { … }
}
namespace proxy_resolver::mojom::blink {
void HostResolverRequestClientInterceptorForTesting::ReportResult(int32_t error, const WTF::Vector<::net::IPAddress>& result) { … }
HostResolverRequestClientAsyncWaiter::HostResolverRequestClientAsyncWaiter(
HostResolverRequestClient* proxy) : … { … }
HostResolverRequestClientAsyncWaiter::~HostResolverRequestClientAsyncWaiter() = default;
void ProxyResolverInterceptorForTesting::GetProxyForUrl(const ::blink::KURL& url, ::network::mojom::blink::NetworkAnonymizationKeyPtr network_anonymization_key, ::mojo::PendingRemote<ProxyResolverRequestClient> client) { … }
ProxyResolverAsyncWaiter::ProxyResolverAsyncWaiter(
ProxyResolver* proxy) : … { … }
ProxyResolverAsyncWaiter::~ProxyResolverAsyncWaiter() = default;
void ProxyResolverRequestClientInterceptorForTesting::ReportResult(int32_t error, ProxyInfoPtr proxy_info) { … }
void ProxyResolverRequestClientInterceptorForTesting::Alert(const WTF::String& error) { … }
void ProxyResolverRequestClientInterceptorForTesting::OnError(int32_t line_number, const WTF::String& error) { … }
void ProxyResolverRequestClientInterceptorForTesting::ResolveDns(const WTF::String& host, HostResolveOperation operation, ::network::mojom::blink::NetworkAnonymizationKeyPtr network_anonymization_key, ::mojo::PendingRemote<HostResolverRequestClient> client) { … }
ProxyResolverRequestClientAsyncWaiter::ProxyResolverRequestClientAsyncWaiter(
ProxyResolverRequestClient* proxy) : … { … }
ProxyResolverRequestClientAsyncWaiter::~ProxyResolverRequestClientAsyncWaiter() = default;
void ProxyResolverFactoryInterceptorForTesting::CreateResolver(const WTF::String& pac_script, ::mojo::PendingReceiver<ProxyResolver> receiver, ::mojo::PendingRemote<ProxyResolverFactoryRequestClient> client) { … }
ProxyResolverFactoryAsyncWaiter::ProxyResolverFactoryAsyncWaiter(
ProxyResolverFactory* proxy) : … { … }
ProxyResolverFactoryAsyncWaiter::~ProxyResolverFactoryAsyncWaiter() = default;
void ProxyResolverFactoryRequestClientInterceptorForTesting::ReportResult(int32_t error) { … }
void ProxyResolverFactoryRequestClientInterceptorForTesting::Alert(const WTF::String& error) { … }
void ProxyResolverFactoryRequestClientInterceptorForTesting::OnError(int32_t line_number, const WTF::String& error) { … }
void ProxyResolverFactoryRequestClientInterceptorForTesting::ResolveDns(const WTF::String& host, HostResolveOperation operation, ::network::mojom::blink::NetworkAnonymizationKeyPtr network_anonymization_key, ::mojo::PendingRemote<HostResolverRequestClient> client) { … }
ProxyResolverFactoryRequestClientAsyncWaiter::ProxyResolverFactoryRequestClientAsyncWaiter(
ProxyResolverFactoryRequestClient* proxy) : … { … }
ProxyResolverFactoryRequestClientAsyncWaiter::~ProxyResolverFactoryRequestClientAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif