#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom.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 "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom-params-data.h"
#include "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom-import-headers.h"
#include "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom-test-utils.h"
#include "third_party/blink/common/permissions_policy/permissions_policy_mojom_traits.h"
namespace blink::mojom {
AuctionAdConfigAuctionId::AuctionAdConfigAuctionId() : … { … }
AuctionAdConfigAuctionId::~AuctionAdConfigAuctionId() { … }
void AuctionAdConfigAuctionId::set_main_auction(
uint32_t main_auction) { … }
void AuctionAdConfigAuctionId::set_component_auction(
uint32_t component_auction) { … }
void AuctionAdConfigAuctionId::DestroyActive() { … }
size_t AuctionAdConfigAuctionId::Hash(size_t seed) const { … }
bool AuctionAdConfigAuctionId::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char AbortableAdAuction::Name_[] = …;
AbortableAdAuction::IPCStableHashFunction AbortableAdAuction::MessageToMethodInfo_(mojo::Message& message) { … }
const char* AbortableAdAuction::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t AbortableAdAuction::ResolvedPromiseParam_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedPerBuyerSignalsPromise_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedBuyerTimeoutsPromise_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedBuyerCurrenciesPromise_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedDirectFromSellerSignalsPromise_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedDirectFromSellerSignalsHeaderAdSlotPromise_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedDeprecatedRenderURLReplacementsPromise_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedAuctionAdResponsePromise_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::ResolvedAdditionalBids_Sym::IPCStableHash() { … }
uint32_t AbortableAdAuction::Abort_Sym::IPCStableHash() { … }
# endif
AbortableAdAuctionProxy::AbortableAdAuctionProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void AbortableAdAuctionProxy::ResolvedPromiseParam(
AuctionAdConfigAuctionIdPtr in_auction, AuctionAdConfigField in_field, const std::optional<std::string>& in_json_value) { … }
void AbortableAdAuctionProxy::ResolvedPerBuyerSignalsPromise(
AuctionAdConfigAuctionIdPtr in_auction, const std::optional<base::flat_map<::url::Origin, std::string>>& in_per_buyer_signals) { … }
void AbortableAdAuctionProxy::ResolvedBuyerTimeoutsPromise(
AuctionAdConfigAuctionIdPtr in_auction, AuctionAdConfigBuyerTimeoutField in_field, const ::blink::AuctionConfig::BuyerTimeouts& in_buyer_timeouts) { … }
void AbortableAdAuctionProxy::ResolvedBuyerCurrenciesPromise(
AuctionAdConfigAuctionIdPtr in_auction, const ::blink::AuctionConfig::BuyerCurrencies& in_per_buyer_currencies) { … }
void AbortableAdAuctionProxy::ResolvedDirectFromSellerSignalsPromise(
AuctionAdConfigAuctionIdPtr in_auction, const std::optional<::blink::DirectFromSellerSignals>& in_direct_from_seller_signals) { … }
void AbortableAdAuctionProxy::ResolvedDirectFromSellerSignalsHeaderAdSlotPromise(
AuctionAdConfigAuctionIdPtr in_auction, const std::optional<std::string>& in_direct_from_seller_signals_header_ad_slot) { … }
void AbortableAdAuctionProxy::ResolvedDeprecatedRenderURLReplacementsPromise(
AuctionAdConfigAuctionIdPtr in_auction, const std::vector<::blink::AuctionConfig::AdKeywordReplacement>& in_deprecated_render_url_replacements) { … }
void AbortableAdAuctionProxy::ResolvedAuctionAdResponsePromise(
AuctionAdConfigAuctionIdPtr in_auction, ::mojo_base::BigBuffer in_result) { … }
void AbortableAdAuctionProxy::ResolvedAdditionalBids(
AuctionAdConfigAuctionIdPtr in_auction) { … }
void AbortableAdAuctionProxy::Abort(
) { … }
bool AbortableAdAuctionStubDispatch::Accept(
AbortableAdAuction* impl,
mojo::Message* message) { … }
bool AbortableAdAuctionStubDispatch::AcceptWithResponder(
AbortableAdAuction* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kAbortableAdAuctionValidationInfo[] = …;
bool AbortableAdAuctionRequestValidator::Accept(mojo::Message* message) { … }
const char AdAuctionService::Name_[] = …;
AdAuctionService::IPCStableHashFunction AdAuctionService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* AdAuctionService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t AdAuctionService::CreateAdRequest_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::FinalizeAd_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::RunAdAuction_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::JoinInterestGroup_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::LeaveInterestGroup_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::LeaveInterestGroupForDocument_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::ClearOriginJoinedInterestGroups_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::UpdateAdInterestGroups_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::DeprecatedGetURLFromURN_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::DeprecatedReplaceInURN_Sym::IPCStableHash() { … }
uint32_t AdAuctionService::GetInterestGroupAdAuctionData_Sym::IPCStableHash() { … }
# endif
class AdAuctionService_CreateAdRequest_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_FinalizeAd_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_RunAdAuction_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_JoinInterestGroup_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_LeaveInterestGroup_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_ClearOriginJoinedInterestGroups_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_DeprecatedGetURLFromURN_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_DeprecatedReplaceInURN_ForwardToCallback
: public mojo::MessageReceiver { … };
class AdAuctionService_GetInterestGroupAdAuctionData_ForwardToCallback
: public mojo::MessageReceiver { … };
AdAuctionServiceProxy::AdAuctionServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void AdAuctionServiceProxy::CreateAdRequest(
::blink::mojom::AdRequestConfigPtr in_config, CreateAdRequestCallback callback) { … }
void AdAuctionServiceProxy::FinalizeAd(
const std::string& in_ads_guid, const ::blink::AuctionConfig& in_config, FinalizeAdCallback callback) { … }
void AdAuctionServiceProxy::RunAdAuction(
const ::blink::AuctionConfig& in_config, ::mojo::PendingReceiver<AbortableAdAuction> in_abort_receiver, RunAdAuctionCallback callback) { … }
void AdAuctionServiceProxy::JoinInterestGroup(
const ::blink::InterestGroup& in_group, JoinInterestGroupCallback callback) { … }
void AdAuctionServiceProxy::LeaveInterestGroup(
const ::url::Origin& in_owner, const std::string& in_name, LeaveInterestGroupCallback callback) { … }
void AdAuctionServiceProxy::LeaveInterestGroupForDocument(
) { … }
void AdAuctionServiceProxy::ClearOriginJoinedInterestGroups(
const ::url::Origin& in_owner, const std::vector<std::string>& in_interest_groups_to_keep, ClearOriginJoinedInterestGroupsCallback callback) { … }
void AdAuctionServiceProxy::UpdateAdInterestGroups(
) { … }
void AdAuctionServiceProxy::DeprecatedGetURLFromURN(
const ::GURL& in_uuid_url, bool in_send_reports, DeprecatedGetURLFromURNCallback callback) { … }
void AdAuctionServiceProxy::DeprecatedReplaceInURN(
const ::GURL& in_uuid_url, const std::vector<::blink::AuctionConfig::AdKeywordReplacement>& in_replacements, DeprecatedReplaceInURNCallback callback) { … }
void AdAuctionServiceProxy::GetInterestGroupAdAuctionData(
const ::url::Origin& in_seller, const std::optional<::url::Origin>& in_coordinator, ::blink::mojom::AuctionDataConfigPtr in_config, GetInterestGroupAdAuctionDataCallback callback) { … }
class AdAuctionService_CreateAdRequest_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_CreateAdRequest_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_CreateAdRequest_ProxyToResponder::Run(
const std::optional<std::string>& in_ads_guid) { … }
class AdAuctionService_FinalizeAd_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_FinalizeAd_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_FinalizeAd_ProxyToResponder::Run(
const std::optional<::GURL>& in_ad_display_url) { … }
class AdAuctionService_RunAdAuction_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_RunAdAuction_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_RunAdAuction_ProxyToResponder::Run(
bool in_aborted_by_script, const std::optional<::blink::FencedFrame::RedactedFencedFrameConfig>& in_config) { … }
class AdAuctionService_JoinInterestGroup_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_JoinInterestGroup_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_JoinInterestGroup_ProxyToResponder::Run(
bool in_failed_well_known_check) { … }
class AdAuctionService_LeaveInterestGroup_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_LeaveInterestGroup_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_LeaveInterestGroup_ProxyToResponder::Run(
bool in_failed_well_known_check) { … }
class AdAuctionService_ClearOriginJoinedInterestGroups_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_ClearOriginJoinedInterestGroups_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_ClearOriginJoinedInterestGroups_ProxyToResponder::Run(
bool in_failed_well_known_check) { … }
class AdAuctionService_DeprecatedGetURLFromURN_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_DeprecatedGetURLFromURN_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_DeprecatedGetURLFromURN_ProxyToResponder::Run(
const std::optional<::GURL>& in_decoded_url) { … }
class AdAuctionService_DeprecatedReplaceInURN_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_DeprecatedReplaceInURN_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_DeprecatedReplaceInURN_ProxyToResponder::Run(
) { … }
class AdAuctionService_GetInterestGroupAdAuctionData_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool AdAuctionService_GetInterestGroupAdAuctionData_ForwardToCallback::Accept(
mojo::Message* message) { … }
void AdAuctionService_GetInterestGroupAdAuctionData_ProxyToResponder::Run(
::mojo_base::BigBuffer in_request, const std::optional<::base::Uuid>& in_request_id, const std::string& in_error_message) { … }
bool AdAuctionServiceStubDispatch::Accept(
AdAuctionService* impl,
mojo::Message* message) { … }
bool AdAuctionServiceStubDispatch::AcceptWithResponder(
AdAuctionService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kAdAuctionServiceValidationInfo[] = …;
bool AdAuctionServiceRequestValidator::Accept(mojo::Message* message) { … }
bool AdAuctionServiceResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool UnionTraits<::blink::mojom::AuctionAdConfigAuctionId::DataView, ::blink::mojom::AuctionAdConfigAuctionIdPtr>::Read(
::blink::mojom::AuctionAdConfigAuctionId::DataView input,
::blink::mojom::AuctionAdConfigAuctionIdPtr* output) { … }
}
namespace blink::mojom {
void AbortableAdAuctionInterceptorForTesting::ResolvedPromiseParam(AuctionAdConfigAuctionIdPtr auction, AuctionAdConfigField field, const std::optional<std::string>& json_value) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedPerBuyerSignalsPromise(AuctionAdConfigAuctionIdPtr auction, const std::optional<base::flat_map<::url::Origin, std::string>>& per_buyer_signals) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedBuyerTimeoutsPromise(AuctionAdConfigAuctionIdPtr auction, AuctionAdConfigBuyerTimeoutField field, const ::blink::AuctionConfig::BuyerTimeouts& buyer_timeouts) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedBuyerCurrenciesPromise(AuctionAdConfigAuctionIdPtr auction, const ::blink::AuctionConfig::BuyerCurrencies& per_buyer_currencies) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedDirectFromSellerSignalsPromise(AuctionAdConfigAuctionIdPtr auction, const std::optional<::blink::DirectFromSellerSignals>& direct_from_seller_signals) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedDirectFromSellerSignalsHeaderAdSlotPromise(AuctionAdConfigAuctionIdPtr auction, const std::optional<std::string>& direct_from_seller_signals_header_ad_slot) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedDeprecatedRenderURLReplacementsPromise(AuctionAdConfigAuctionIdPtr auction, const std::vector<::blink::AuctionConfig::AdKeywordReplacement>& deprecated_render_url_replacements) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedAuctionAdResponsePromise(AuctionAdConfigAuctionIdPtr auction, ::mojo_base::BigBuffer result) { … }
void AbortableAdAuctionInterceptorForTesting::ResolvedAdditionalBids(AuctionAdConfigAuctionIdPtr auction) { … }
void AbortableAdAuctionInterceptorForTesting::Abort() { … }
AbortableAdAuctionAsyncWaiter::AbortableAdAuctionAsyncWaiter(
AbortableAdAuction* proxy) : … { … }
AbortableAdAuctionAsyncWaiter::~AbortableAdAuctionAsyncWaiter() = default;
void AdAuctionServiceInterceptorForTesting::CreateAdRequest(::blink::mojom::AdRequestConfigPtr config, CreateAdRequestCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::FinalizeAd(const std::string& ads_guid, const ::blink::AuctionConfig& config, FinalizeAdCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::RunAdAuction(const ::blink::AuctionConfig& config, ::mojo::PendingReceiver<AbortableAdAuction> abort_receiver, RunAdAuctionCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::JoinInterestGroup(const ::blink::InterestGroup& group, JoinInterestGroupCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::LeaveInterestGroup(const ::url::Origin& owner, const std::string& name, LeaveInterestGroupCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::LeaveInterestGroupForDocument() { … }
void AdAuctionServiceInterceptorForTesting::ClearOriginJoinedInterestGroups(const ::url::Origin& owner, const std::vector<std::string>& interest_groups_to_keep, ClearOriginJoinedInterestGroupsCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::UpdateAdInterestGroups() { … }
void AdAuctionServiceInterceptorForTesting::DeprecatedGetURLFromURN(const ::GURL& uuid_url, bool send_reports, DeprecatedGetURLFromURNCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::DeprecatedReplaceInURN(const ::GURL& uuid_url, const std::vector<::blink::AuctionConfig::AdKeywordReplacement>& replacements, DeprecatedReplaceInURNCallback callback) { … }
void AdAuctionServiceInterceptorForTesting::GetInterestGroupAdAuctionData(const ::url::Origin& seller, const std::optional<::url::Origin>& coordinator, ::blink::mojom::AuctionDataConfigPtr config, GetInterestGroupAdAuctionDataCallback callback) { … }
AdAuctionServiceAsyncWaiter::AdAuctionServiceAsyncWaiter(
AdAuctionService* proxy) : … { … }
AdAuctionServiceAsyncWaiter::~AdAuctionServiceAsyncWaiter() = default;
void AdAuctionServiceAsyncWaiter::CreateAdRequest(
::blink::mojom::AdRequestConfigPtr config, std::optional<std::string>* out_ads_guid) { … }
std::optional<std::string> AdAuctionServiceAsyncWaiter::CreateAdRequest(
::blink::mojom::AdRequestConfigPtr config) { … }
void AdAuctionServiceAsyncWaiter::FinalizeAd(
const std::string& ads_guid, const ::blink::AuctionConfig& config, std::optional<::GURL>* out_ad_display_url) { … }
std::optional<::GURL> AdAuctionServiceAsyncWaiter::FinalizeAd(
const std::string& ads_guid, const ::blink::AuctionConfig& config) { … }
void AdAuctionServiceAsyncWaiter::RunAdAuction(
const ::blink::AuctionConfig& config, ::mojo::PendingReceiver<AbortableAdAuction> abort_receiver, bool* out_aborted_by_script, std::optional<::blink::FencedFrame::RedactedFencedFrameConfig>* out_config) { … }
void AdAuctionServiceAsyncWaiter::JoinInterestGroup(
const ::blink::InterestGroup& group, bool* out_failed_well_known_check) { … }
bool AdAuctionServiceAsyncWaiter::JoinInterestGroup(
const ::blink::InterestGroup& group) { … }
void AdAuctionServiceAsyncWaiter::LeaveInterestGroup(
const ::url::Origin& owner, const std::string& name, bool* out_failed_well_known_check) { … }
bool AdAuctionServiceAsyncWaiter::LeaveInterestGroup(
const ::url::Origin& owner, const std::string& name) { … }
void AdAuctionServiceAsyncWaiter::ClearOriginJoinedInterestGroups(
const ::url::Origin& owner, const std::vector<std::string>& interest_groups_to_keep, bool* out_failed_well_known_check) { … }
bool AdAuctionServiceAsyncWaiter::ClearOriginJoinedInterestGroups(
const ::url::Origin& owner, const std::vector<std::string>& interest_groups_to_keep) { … }
void AdAuctionServiceAsyncWaiter::DeprecatedGetURLFromURN(
const ::GURL& uuid_url, bool send_reports, std::optional<::GURL>* out_decoded_url) { … }
std::optional<::GURL> AdAuctionServiceAsyncWaiter::DeprecatedGetURLFromURN(
const ::GURL& uuid_url, bool send_reports) { … }
void AdAuctionServiceAsyncWaiter::DeprecatedReplaceInURN(
const ::GURL& uuid_url, const std::vector<::blink::AuctionConfig::AdKeywordReplacement>& replacements) { … }
void AdAuctionServiceAsyncWaiter::GetInterestGroupAdAuctionData(
const ::url::Origin& seller, const std::optional<::url::Origin>& coordinator, ::blink::mojom::AuctionDataConfigPtr config, ::mojo_base::BigBuffer* out_request, std::optional<::base::Uuid>* out_request_id, std::string* out_error_message) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif