#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "content/services/auction_worklet/public/mojom/seller_worklet.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 "content/services/auction_worklet/public/mojom/seller_worklet.mojom-params-data.h"
#include "content/services/auction_worklet/public/mojom/seller_worklet.mojom-shared-message-ids.h"
#include "content/services/auction_worklet/public/mojom/seller_worklet.mojom-import-headers.h"
#include "content/services/auction_worklet/public/mojom/seller_worklet.mojom-test-utils.h"
namespace auction_worklet::mojom {
ComponentAuctionModifiedBidParams::ComponentAuctionModifiedBidParams()
: … { … }
ComponentAuctionModifiedBidParams::ComponentAuctionModifiedBidParams(
const std::string& ad_in,
std::optional<double> bid_in,
const std::optional<::blink::AdCurrency>& bid_currency_in)
: … { … }
ComponentAuctionModifiedBidParams::~ComponentAuctionModifiedBidParams() = default;
void ComponentAuctionModifiedBidParams::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ComponentAuctionModifiedBidParams::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ComponentAuctionReportResultParams::ComponentAuctionReportResultParams()
: … { … }
ComponentAuctionReportResultParams::ComponentAuctionReportResultParams(
const std::string& top_level_seller_signals_in,
std::optional<double> modified_bid_in)
: … { … }
ComponentAuctionReportResultParams::~ComponentAuctionReportResultParams() = default;
void ComponentAuctionReportResultParams::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ComponentAuctionReportResultParams::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ScoreAdDependencyLatencies::ScoreAdDependencyLatencies()
: … { … }
ScoreAdDependencyLatencies::ScoreAdDependencyLatencies(
std::optional<::base::TimeDelta> code_ready_latency_in,
std::optional<::base::TimeDelta> direct_from_seller_signals_latency_in,
std::optional<::base::TimeDelta> trusted_scoring_signals_latency_in,
::base::TimeTicks deps_wait_start_time_in,
::base::TimeTicks score_ad_start_time_in,
::base::TimeTicks score_ad_finish_time_in)
: … { … }
ScoreAdDependencyLatencies::~ScoreAdDependencyLatencies() = default;
void ScoreAdDependencyLatencies::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ScoreAdDependencyLatencies::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ComponentAuctionOtherSeller::ComponentAuctionOtherSeller() : … { … }
ComponentAuctionOtherSeller::~ComponentAuctionOtherSeller() { … }
void ComponentAuctionOtherSeller::set_top_level_seller(
const ::url::Origin& top_level_seller) { … }
void ComponentAuctionOtherSeller::set_component_seller(
const ::url::Origin& component_seller) { … }
void ComponentAuctionOtherSeller::DestroyActive() { … }
bool ComponentAuctionOtherSeller::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char ScoreAdClient::Name_[] = …;
ScoreAdClient::IPCStableHashFunction ScoreAdClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* ScoreAdClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t ScoreAdClient::OnScoreAdComplete_Sym::IPCStableHash() { … }
# endif
ScoreAdClientProxy::ScoreAdClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void ScoreAdClientProxy::OnScoreAdComplete(
double in_score, ::auction_worklet::mojom::RejectReason in_reject_reason, ComponentAuctionModifiedBidParamsPtr in_component_auction_modified_bid_params, std::optional<double> in_bid_in_seller_currency, std::optional<uint32_t> in_scoring_signals_data_version, const std::optional<::GURL>& in_debug_loss_report_url, const std::optional<::GURL>& in_debug_win_report_url, std::vector<::auction_worklet::mojom::PrivateAggregationRequestPtr> in_pa_requests, std::vector<::auction_worklet::mojom::RealTimeReportingContributionPtr> in_real_time_contributions, ::base::TimeDelta in_scoring_latency, ScoreAdDependencyLatenciesPtr in_score_ad_dependency_latencies, const std::vector<std::string>& in_errors) { … }
bool ScoreAdClientStubDispatch::Accept(
ScoreAdClient* impl,
mojo::Message* message) { … }
bool ScoreAdClientStubDispatch::AcceptWithResponder(
ScoreAdClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kScoreAdClientValidationInfo[] = …;
bool ScoreAdClientRequestValidator::Accept(mojo::Message* message) { … }
const char SellerWorklet::Name_[] = …;
SellerWorklet::IPCStableHashFunction SellerWorklet::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SellerWorklet::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SellerWorklet::ScoreAd_Sym::IPCStableHash() { … }
uint32_t SellerWorklet::SendPendingSignalsRequests_Sym::IPCStableHash() { … }
uint32_t SellerWorklet::ReportResult_Sym::IPCStableHash() { … }
uint32_t SellerWorklet::ConnectDevToolsAgent_Sym::IPCStableHash() { … }
# endif
class SellerWorklet_ReportResult_ForwardToCallback
: public mojo::MessageReceiver { … };
SellerWorkletProxy::SellerWorkletProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SellerWorkletProxy::ScoreAd(
const std::string& in_ad_metadata_json, double in_bid, const std::optional<::blink::AdCurrency>& in_bid_currency, const ::blink::AuctionConfig::NonSharedParams& in_auction_ad_config_non_shared_params, const std::optional<::GURL>& in_direct_from_seller_seller_signals, const std::optional<std::string>& in_direct_from_seller_seller_signals_header_ad_slot, const std::optional<::GURL>& in_direct_from_seller_auction_signals, const std::optional<std::string>& in_direct_from_seller_auction_signals_header_ad_slot, ComponentAuctionOtherSellerPtr in_browser_signals_other_seller, const std::optional<::blink::AdCurrency>& in_component_expect_bid_currency, const ::url::Origin& in_browser_signal_interest_group_owner, const ::GURL& in_browser_signal_render_url, const std::optional<std::string>& in_browser_signal_selected_buyer_and_seller_reporting_id, const std::optional<std::string>& in_browser_signal_buyer_and_seller_reporting_id, const std::vector<::GURL>& in_browser_signal_ad_component_render_urls, uint32_t in_browser_signal_bidding_duration_msecs, const std::optional<::blink::AdSize>& in_browser_signal_render_size, bool in_browser_signal_for_debugging_only_in_cooldown_or_lockout, std::optional<::base::TimeDelta> in_seller_timeout, uint64_t in_trace_id, ::mojo::PendingRemote<ScoreAdClient> in_score_ad_client) { … }
void SellerWorkletProxy::SendPendingSignalsRequests(
) { … }
void SellerWorkletProxy::ReportResult(
const ::blink::AuctionConfig::NonSharedParams& in_auction_ad_config_non_shared_params, const std::optional<::GURL>& in_direct_from_seller_seller_signals, const std::optional<std::string>& in_direct_from_seller_seller_signals_header_ad_slot, const std::optional<::GURL>& in_direct_from_seller_auction_signals, const std::optional<std::string>& in_direct_from_seller_auction_signals_header_ad_slot, ComponentAuctionOtherSellerPtr in_browser_signals_other_seller, const ::url::Origin& in_browser_signal_interest_group_owner, const std::optional<std::string>& in_browser_signal_buyer_and_seller_reporting_id, const std::optional<std::string>& in_browser_signal_selected_buyer_and_seller_reporting_id, const ::GURL& in_browser_signal_render_url, double in_browser_signal_bid, const std::optional<::blink::AdCurrency>& in_browser_signal_bid_currency, double in_browser_signal_desirability, double in_browser_signal_highest_scoring_other_bid, const std::optional<::blink::AdCurrency>& in_browser_signal_highest_scoring_other_bid_currency, ComponentAuctionReportResultParamsPtr in_browser_signals_component_auction_report_result_params, std::optional<uint32_t> in_scoring_signals_data_version, uint64_t in_trace_id, ReportResultCallback callback) { … }
void SellerWorkletProxy::ConnectDevToolsAgent(
::mojo::PendingAssociatedReceiver<::blink::mojom::DevToolsAgent> in_agent, uint32_t in_thread_index) { … }
class SellerWorklet_ReportResult_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool SellerWorklet_ReportResult_ForwardToCallback::Accept(
mojo::Message* message) { … }
void SellerWorklet_ReportResult_ProxyToResponder::Run(
const std::optional<std::string>& in_signals_for_winner, const std::optional<::GURL>& in_report_url, const base::flat_map<std::string, ::GURL>& in_ad_beacon_map, std::vector<::auction_worklet::mojom::PrivateAggregationRequestPtr> in_pa_requests, ::base::TimeDelta in_reporting_latency, const std::vector<std::string>& in_error_msgs) { … }
bool SellerWorkletStubDispatch::Accept(
SellerWorklet* impl,
mojo::Message* message) { … }
bool SellerWorkletStubDispatch::AcceptWithResponder(
SellerWorklet* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSellerWorkletValidationInfo[] = …;
bool SellerWorkletRequestValidator::Accept(mojo::Message* message) { … }
bool SellerWorkletResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::auction_worklet::mojom::ComponentAuctionModifiedBidParams::DataView, ::auction_worklet::mojom::ComponentAuctionModifiedBidParamsPtr>::Read(
::auction_worklet::mojom::ComponentAuctionModifiedBidParams::DataView input,
::auction_worklet::mojom::ComponentAuctionModifiedBidParamsPtr* output) { … }
bool StructTraits<::auction_worklet::mojom::ComponentAuctionReportResultParams::DataView, ::auction_worklet::mojom::ComponentAuctionReportResultParamsPtr>::Read(
::auction_worklet::mojom::ComponentAuctionReportResultParams::DataView input,
::auction_worklet::mojom::ComponentAuctionReportResultParamsPtr* output) { … }
bool StructTraits<::auction_worklet::mojom::ScoreAdDependencyLatencies::DataView, ::auction_worklet::mojom::ScoreAdDependencyLatenciesPtr>::Read(
::auction_worklet::mojom::ScoreAdDependencyLatencies::DataView input,
::auction_worklet::mojom::ScoreAdDependencyLatenciesPtr* output) { … }
bool UnionTraits<::auction_worklet::mojom::ComponentAuctionOtherSeller::DataView, ::auction_worklet::mojom::ComponentAuctionOtherSellerPtr>::Read(
::auction_worklet::mojom::ComponentAuctionOtherSeller::DataView input,
::auction_worklet::mojom::ComponentAuctionOtherSellerPtr* output) { … }
}
namespace auction_worklet::mojom {
void ScoreAdClientInterceptorForTesting::OnScoreAdComplete(double score, ::auction_worklet::mojom::RejectReason reject_reason, ComponentAuctionModifiedBidParamsPtr component_auction_modified_bid_params, std::optional<double> bid_in_seller_currency, std::optional<uint32_t> scoring_signals_data_version, const std::optional<::GURL>& debug_loss_report_url, const std::optional<::GURL>& debug_win_report_url, std::vector<::auction_worklet::mojom::PrivateAggregationRequestPtr> pa_requests, std::vector<::auction_worklet::mojom::RealTimeReportingContributionPtr> real_time_contributions, ::base::TimeDelta scoring_latency, ScoreAdDependencyLatenciesPtr score_ad_dependency_latencies, const std::vector<std::string>& errors) { … }
ScoreAdClientAsyncWaiter::ScoreAdClientAsyncWaiter(
ScoreAdClient* proxy) : … { … }
ScoreAdClientAsyncWaiter::~ScoreAdClientAsyncWaiter() = default;
void SellerWorkletInterceptorForTesting::ScoreAd(const std::string& ad_metadata_json, double bid, const std::optional<::blink::AdCurrency>& bid_currency, const ::blink::AuctionConfig::NonSharedParams& auction_ad_config_non_shared_params, const std::optional<::GURL>& direct_from_seller_seller_signals, const std::optional<std::string>& direct_from_seller_seller_signals_header_ad_slot, const std::optional<::GURL>& direct_from_seller_auction_signals, const std::optional<std::string>& direct_from_seller_auction_signals_header_ad_slot, ComponentAuctionOtherSellerPtr browser_signals_other_seller, const std::optional<::blink::AdCurrency>& component_expect_bid_currency, const ::url::Origin& browser_signal_interest_group_owner, const ::GURL& browser_signal_render_url, const std::optional<std::string>& browser_signal_selected_buyer_and_seller_reporting_id, const std::optional<std::string>& browser_signal_buyer_and_seller_reporting_id, const std::vector<::GURL>& browser_signal_ad_component_render_urls, uint32_t browser_signal_bidding_duration_msecs, const std::optional<::blink::AdSize>& browser_signal_render_size, bool browser_signal_for_debugging_only_in_cooldown_or_lockout, std::optional<::base::TimeDelta> seller_timeout, uint64_t trace_id, ::mojo::PendingRemote<ScoreAdClient> score_ad_client) { … }
void SellerWorkletInterceptorForTesting::SendPendingSignalsRequests() { … }
void SellerWorkletInterceptorForTesting::ReportResult(const ::blink::AuctionConfig::NonSharedParams& auction_ad_config_non_shared_params, const std::optional<::GURL>& direct_from_seller_seller_signals, const std::optional<std::string>& direct_from_seller_seller_signals_header_ad_slot, const std::optional<::GURL>& direct_from_seller_auction_signals, const std::optional<std::string>& direct_from_seller_auction_signals_header_ad_slot, ComponentAuctionOtherSellerPtr browser_signals_other_seller, const ::url::Origin& browser_signal_interest_group_owner, const std::optional<std::string>& browser_signal_buyer_and_seller_reporting_id, const std::optional<std::string>& browser_signal_selected_buyer_and_seller_reporting_id, const ::GURL& browser_signal_render_url, double browser_signal_bid, const std::optional<::blink::AdCurrency>& browser_signal_bid_currency, double browser_signal_desirability, double browser_signal_highest_scoring_other_bid, const std::optional<::blink::AdCurrency>& browser_signal_highest_scoring_other_bid_currency, ComponentAuctionReportResultParamsPtr browser_signals_component_auction_report_result_params, std::optional<uint32_t> scoring_signals_data_version, uint64_t trace_id, ReportResultCallback callback) { … }
void SellerWorkletInterceptorForTesting::ConnectDevToolsAgent(::mojo::PendingAssociatedReceiver<::blink::mojom::DevToolsAgent> agent, uint32_t thread_index) { … }
SellerWorkletAsyncWaiter::SellerWorkletAsyncWaiter(
SellerWorklet* proxy) : … { … }
SellerWorkletAsyncWaiter::~SellerWorkletAsyncWaiter() = default;
void SellerWorkletAsyncWaiter::ReportResult(
const ::blink::AuctionConfig::NonSharedParams& auction_ad_config_non_shared_params, const std::optional<::GURL>& direct_from_seller_seller_signals, const std::optional<std::string>& direct_from_seller_seller_signals_header_ad_slot, const std::optional<::GURL>& direct_from_seller_auction_signals, const std::optional<std::string>& direct_from_seller_auction_signals_header_ad_slot, ComponentAuctionOtherSellerPtr browser_signals_other_seller, const ::url::Origin& browser_signal_interest_group_owner, const std::optional<std::string>& browser_signal_buyer_and_seller_reporting_id, const std::optional<std::string>& browser_signal_selected_buyer_and_seller_reporting_id, const ::GURL& browser_signal_render_url, double browser_signal_bid, const std::optional<::blink::AdCurrency>& browser_signal_bid_currency, double browser_signal_desirability, double browser_signal_highest_scoring_other_bid, const std::optional<::blink::AdCurrency>& browser_signal_highest_scoring_other_bid_currency, ComponentAuctionReportResultParamsPtr browser_signals_component_auction_report_result_params, std::optional<uint32_t> scoring_signals_data_version, uint64_t trace_id, std::optional<std::string>* out_signals_for_winner, std::optional<::GURL>* out_report_url, base::flat_map<std::string, ::GURL>* out_ad_beacon_map, std::vector<::auction_worklet::mojom::PrivateAggregationRequestPtr>* out_pa_requests, ::base::TimeDelta* out_reporting_latency, std::vector<std::string>* out_error_msgs) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif