#include "third_party/blink/renderer/modules/ad_auction/navigator_auction.h"
#include <stdint.h>
#include <optional>
#include <utility>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_functions.h"
#include "base/numerics/checked_math.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "base/types/expected_macros.h"
#include "base/types/pass_key.h"
#include "base/unguessable_token.h"
#include "base/uuid.h"
#include "components/aggregation_service/aggregation_coordinator_utils.h"
#include "mojo/public/cpp/bindings/map_traits_wtf_hash_map.h"
#include "third_party/abseil-cpp/absl/numeric/int128.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/fenced_frame/fenced_frame_utils.h"
#include "third_party/blink/public/common/frame/fenced_frame_sandbox_flags.h"
#include "third_party/blink/public/common/interest_group/ad_auction_constants.h"
#include "third_party/blink/public/common/interest_group/ad_auction_currencies.h"
#include "third_party/blink/public/common/interest_group/ad_display_size_utils.h"
#include "third_party/blink/public/common/interest_group/interest_group.h"
#include "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom-blink.h"
#include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom-blink.h"
#include "third_party/blink/public/mojom/parakeet/ad_request.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/web/web_console_message.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_fencedframeconfig_usvstring.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_usvstring_usvstringsequence.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ad_auction_data.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ad_auction_data_buyer_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ad_auction_data_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ad_properties.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ad_request_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ad_targeting.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_ads.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_ad.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_interest_group.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_interest_group_key.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_ad_interest_group_size.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_additional_bid_signature.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_real_time_reporting_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_report_buyer_debug_mode_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_auction_report_buyers_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_protected_audience_private_aggregation_config.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_union_adproperties_adpropertiessequence.h"
#include "third_party/blink/renderer/core/dom/abort_signal.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/dom/scoped_abort_state.h"
#include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
#include "third_party/blink/renderer/core/frame/csp/csp_directive_list.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/navigator.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/fenced_frame/fenced_frame_config.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/modules/ad_auction/ads.h"
#include "third_party/blink/renderer/modules/ad_auction/join_leave_queue.h"
#include "third_party/blink/renderer/modules/ad_auction/protected_audience.h"
#include "third_party/blink/renderer/modules/ad_auction/validate_blink_interest_group.h"
#include "third_party/blink/renderer/modules/geolocation/geolocation_coordinates.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/heap/heap_traits.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/text/string_operators.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/boringssl/src/include/openssl/curve25519.h"
#include "url/url_constants.h"
#include "v8/include/v8-primitive.h"
#include "v8/include/v8-value.h"
namespace blink {
class NavigatorAuction::AuctionHandle final : public AbortSignal::Algorithm { … };
namespace {
const int kMaxActiveCrossSiteJoins = …;
const int kMaxActiveCrossSiteLeaves = …;
const int kMaxActiveCrossSiteClears = …;
String ErrorInvalidInterestGroup(const AuctionAdInterestGroup& group,
const String& field_name,
const String& field_value,
const String& error) { … }
String ErrorInvalidInterestGroupJson(const AuctionAdInterestGroup& group,
const String& field_name) { … }
String ErrorInvalidAuctionConfigSeller(const String& seller_name,
const String& field_name,
const String& field_value,
const String& error) { … }
String ErrorInvalidAuctionConfig(const AuctionAdConfig& config,
const String& field_name,
const String& field_value,
const String& error) { … }
String ErrorInvalidAuctionConfigSellerJson(const String& seller_name,
const String& field_name) { … }
String ErrorInvalidAdRequestConfig(const AdRequestConfig& config,
const String& field_name,
const String& field_value,
const String& error) { … }
String ErrorInvalidAuctionConfigUint(const AuctionAdConfig& config,
const String& field_name,
const String& error) { … }
String ErrorRenameMismatch(const String& old_field_name,
const String& old_field_value,
const String& new_field_name,
const String& new_field_value) { … }
String ErrorMissingRequired(const String& required_field_name) { … }
void AddWarningMessageToConsole(const ExecutionContext& execution_context,
const String& message) { … }
void ConsoleWarnDeprecatedEnum(const ExecutionContext& execution_context,
String enum_name,
String deprecated_value) { … }
bool Jsonify(const ScriptState& script_state,
const v8::Local<v8::Value>& value,
String& output) { … }
base::expected<uint64_t, String> CopyBigIntToUint64(const BigInt& bigint) { … }
base::expected<absl::uint128, String> CopyBigIntToUint128(
const BigInt& bigint) { … }
scoped_refptr<const SecurityOrigin> ParseOrigin(const String& origin_string) { … }
bool CopyLifetimeIdlToMojo(ExceptionState& exception_state,
std::optional<double> lifetime_seconds,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyOwnerFromIdlToMojo(const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
WTF::HashMap<WTF::String, double> ConvertSparseVectorIdlToMojo(
const Vector<std::pair<WTF::String, double>>& priority_signals_in) { … }
mojom::blink::SellerCapabilitiesPtr ConvertSellerCapabilitiesTypeFromIdlToMojo(
const ExecutionContext& execution_context,
const Vector<String>& capabilities_vector) { … }
bool CopySellerCapabilitiesFromIdlToMojo(
const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyExecutionModeFromIdlToMojo(const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyBiddingLogicUrlFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyWasmHelperUrlFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyUpdateUrlFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyTrustedBiddingSignalsUrlFromIdlToMojo(
const ExecutionContext& context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyTrustedBiddingSignalsKeysFromIdlToMojo(
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyTrustedBiddingSignalsSlotSizeModeFromIdlToMojo(
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyMaxTrustedBiddingSignalsURLLengthFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyTrustedBiddingSignalsCoordinatorFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyUserBiddingSignalsFromIdlToMojo(const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyAdsFromIdlToMojo(const ExecutionContext& context,
const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyAdComponentsFromIdlToMojo(const ExecutionContext& context,
const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyAdSizesFromIdlToMojo(const ExecutionContext& context,
const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopySizeGroupsFromIdlToMojo(const ExecutionContext& context,
const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyAuctionServerRequestFlagsFromIdlToMojo(
const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyAdditionalBidKeyFromIdlToMojo(
const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool GetAggregationCoordinatorFromConfig(
ExceptionState& exception_state,
const ProtectedAudiencePrivateAggregationConfig& config,
scoped_refptr<const SecurityOrigin>& aggregation_coordinator_origin_out) { … }
bool CopyAggregationCoordinatorOriginFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdInterestGroup& input,
mojom::blink::InterestGroup& output) { … }
bool CopyAdRequestUrlFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AdRequestConfig& input,
mojom::blink::AdRequestConfig& output) { … }
bool CopyAdPropertiesFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AdRequestConfig& input,
mojom::blink::AdRequestConfig& output) { … }
bool CopyTargetingFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AdRequestConfig& input,
mojom::blink::AdRequestConfig& output) { … }
bool CopyAdSignalsFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AdRequestConfig& input,
mojom::blink::AdRequestConfig& output) { … }
bool CopyFallbackSourceFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AdRequestConfig& input,
mojom::blink::AdRequestConfig& output) { … }
bool CopySellerFromIdlToMojo(ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyServerResponseFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionId* auction_id,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyDecisionLogicUrlFromIdlToMojo(const ExecutionContext& context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyTrustedScoringSignalsFromIdlToMojo(
const ExecutionContext& context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyMaxTrustedScoringSignalsURLLengthFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyTrustedScoringSignalsCoordinatorFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyInterestGroupBuyersFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
mojom::blink::AuctionAdConfigMaybePromiseJsonPtr
ConvertJsonPromiseFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
const ScriptPromiseUntyped& promise,
mojom::blink::AuctionAdConfigField field,
const char* field_name) { … }
void CopyAuctionSignalsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
void CopySellerSignalsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
mojom::blink::DirectFromSellerSignalsSubresourcePtr
TryToBuildDirectFromSellerSignalsSubresource(
const KURL& subresource_url,
const SecurityOrigin& seller,
ExceptionState& exception_state,
const ResourceFetcher& resource_fetcher) { … }
mojom::blink::DirectFromSellerSignalsPtr
ConvertDirectFromSellerSignalsFromV8ToMojo(
const ScriptState& script_state,
const ExecutionContext& context,
ExceptionState& exception_state,
const ResourceFetcher& resource_fetcher,
const String& seller_name,
const SecurityOrigin& seller_origin,
const std::optional<Vector<scoped_refptr<const SecurityOrigin>>>&
interest_group_buyers,
v8::Local<v8::Value> value) { … }
String ConvertIDLStringFromV8ToMojo(const ScriptState& script_state,
ExceptionState& exception_state,
v8::Local<v8::Value> value) { … }
void CopyDirectFromSellerSignalsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
void CopyDirectFromSellerSignalsHeaderAdSlotFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
WTF::Vector<mojom::blink::AdKeywordReplacementPtr>
ConvertVectorIdlToMojoDeprecatedRenderUrlReplacement(
const Vector<std::pair<WTF::String, WTF::String>>& input) { … }
WTF::Vector<mojom::blink::AdKeywordReplacementPtr>
ConvertNonPromiseDeprecatedRenderURLReplacementsFromV8ToMojo(
const ScriptState& script_state,
ExceptionState& exception_state,
const String& seller_name,
v8::Local<v8::Value> value) { … }
void CopyDeprecatedRenderURLReplacementsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyAdditionalBidsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyAggregationCoordinatorOriginFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
std::optional<
mojom::blink::AuctionAdConfigNonSharedParams::RealTimeReportingType>
GetRealTimeReportingTypeFromConfig(
const AuctionRealTimeReportingConfig& config) { … }
bool CopyPerBuyerRealTimeReportingTypesFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
std::optional<HashMap<scoped_refptr<const SecurityOrigin>, String>>
ConvertNonPromisePerBuyerSignalsFromV8ToMojo(const ScriptState& script_state,
ExceptionState& exception_state,
const String& seller_name,
v8::Local<v8::Value> value) { … }
void CopyPerBuyerSignalsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
mojom::blink::AuctionAdConfigBuyerTimeoutsPtr
ConvertNonPromisePerBuyerTimeoutsFromV8ToMojo(
const ScriptState& script_state,
ExceptionState& exception_state,
const String& seller_name,
v8::Local<v8::Value> value,
mojom::blink::AuctionAdConfigBuyerTimeoutField field) { … }
void CopyPerBuyerTimeoutsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
void CopyPerBuyerCumulativeTimeoutsFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
mojom::blink::AuctionAdConfigBuyerCurrenciesPtr
ConvertNonPromisePerBuyerCurrenciesFromV8ToMojo(const ScriptState& script_state,
ExceptionState& exception_state,
const String& seller_name,
v8::Local<v8::Value> value) { … }
void CopyPerBuyerCurrenciesFromIdlToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
const mojom::blink::AuctionAdConfigAuctionId* auction_id,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyPerBuyerExperimentIdsFromIdlToMojo(
const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyPerBuyerGroupLimitsFromIdlToMojo(
const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool ConvertAuctionConfigPrioritySignalsFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdConfig& input,
const Vector<std::pair<WTF::String, double>>& priority_signals_in,
WTF::HashMap<WTF::String, double>& priority_signals_out) { … }
bool CopyPerBuyerPrioritySignalsFromIdlToMojo(
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyAuctionReportBuyerKeysFromIdlToMojo(
ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyAuctionReportBuyersFromIdlToMojo(
ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyAuctionReportBuyerDebugModeConfigFromIdlToMojo(
ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyRequiredSellerSignalsFromIdlToMojo(
const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
mojom::blink::AdSizePtr ParseAdSize(const AuctionAdConfig& input,
const AuctionAdInterestGroupSize& size,
const char* field_name,
ExceptionState& exception_state) { … }
bool CopyRequestedSizeFromIdlToMojo(const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyAllSlotsRequestedSizesFromIdlToMojo(
const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyPerBuyerMultiBidsLimitsFromIdlToMojo(
const ScriptState& script_state,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
bool CopyAuctionNonceFromIdlToMojo(const ExecutionContext& execution_context,
ExceptionState& exception_state,
const AuctionAdConfig& input,
mojom::blink::AuctionAdConfig& output) { … }
mojom::blink::AuctionAdConfigPtr IdlAuctionConfigToMojo(
NavigatorAuction::AuctionHandle* auction_handle,
bool is_top_level,
uint32_t nested_pos,
ScriptState& script_state,
ExecutionContext& context,
ExceptionState& exception_state,
const ResourceFetcher& resource_fetcher,
const AuctionAdConfig& config) { … }
bool ValidateAdsObject(ExceptionState& exception_state, const Ads* ads) { … }
void RecordCommonFledgeUseCounters(Document* document) { … }
bool HandleOldDictNamesJoin(AuctionAdInterestGroup* group,
ExceptionState& exception_state) { … }
bool HandleOldDictNamesRun(AuctionAdConfig* config,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> JoinAdInterestGroupInternal(
ScriptState* script_state,
Navigator& navigator,
AuctionAdInterestGroup* group,
std::optional<double> duration_seconds,
ExceptionState& exception_state) { … }
}
NavigatorAuction::AuctionHandle::AuctionHandleFunction::AuctionHandleFunction(
AuctionHandle* auction_handle)
: … { … }
void NavigatorAuction::AuctionHandle::AuctionHandleFunction::Trace(
Visitor* visitor) const { … }
ScriptValue NavigatorAuction::AuctionHandle::AuctionHandleFunction::Call(
ScriptState* script_state,
ScriptValue value) { … }
NavigatorAuction::AuctionHandle::JsonResolved::JsonResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
mojom::blink::AuctionAdConfigField field,
const String& seller_name,
const char* field_name)
: … { … }
void NavigatorAuction::AuctionHandle::JsonResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::PerBuyerSignalsResolved::
PerBuyerSignalsResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
const String& seller_name)
: … { … }
void NavigatorAuction::AuctionHandle::PerBuyerSignalsResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::DeprecatedRenderURLReplacementsResolved::
DeprecatedRenderURLReplacementsResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
const String& seller_name)
: … { … }
void NavigatorAuction::AuctionHandle::DeprecatedRenderURLReplacementsResolved::
CallImpl(ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::BuyerTimeoutsResolved::BuyerTimeoutsResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
mojom::blink::AuctionAdConfigBuyerTimeoutField field,
const String& seller_name)
: … { … }
void NavigatorAuction::AuctionHandle::BuyerTimeoutsResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::BuyerCurrenciesResolved::
BuyerCurrenciesResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
const String& seller_name)
: … { … }
void NavigatorAuction::AuctionHandle::BuyerCurrenciesResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::DirectFromSellerSignalsResolved::
DirectFromSellerSignalsResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
const String& seller_name,
const scoped_refptr<const SecurityOrigin>& seller_origin,
const std::optional<Vector<scoped_refptr<const SecurityOrigin>>>&
interest_group_buyers)
: … { … }
void NavigatorAuction::AuctionHandle::DirectFromSellerSignalsResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::DirectFromSellerSignalsHeaderAdSlotResolved::
DirectFromSellerSignalsHeaderAdSlotResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
const String& seller_name)
: … { … }
void NavigatorAuction::AuctionHandle::
DirectFromSellerSignalsHeaderAdSlotResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::ServerResponseResolved::ServerResponseResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
const String& seller_name)
: … { … }
void NavigatorAuction::AuctionHandle::ServerResponseResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState& exception_state) { … }
NavigatorAuction::AuctionHandle::AdditionalBidsResolved::AdditionalBidsResolved(
AuctionHandle* auction_handle,
mojom::blink::AuctionAdConfigAuctionIdPtr auction_id,
const String& seller_name)
: … { … }
void NavigatorAuction::AuctionHandle::AdditionalBidsResolved::CallImpl(
ScriptState* script_state,
ScriptValue,
ExceptionState&) { … }
NavigatorAuction::AuctionHandle::ResolveToConfigResolved::
ResolveToConfigResolved(AuctionHandle* auction_handle)
: … { … }
void NavigatorAuction::AuctionHandle::ResolveToConfigResolved::CallImpl(
ScriptState* script_state,
ScriptValue value,
ExceptionState&) { … }
NavigatorAuction::AuctionHandle::Rejected::Rejected(
AuctionHandle* auction_handle)
: … { … }
void NavigatorAuction::AuctionHandle::Rejected::CallImpl(ScriptState*,
ScriptValue,
ExceptionState&) { … }
NavigatorAuction::NavigatorAuction(Navigator& navigator)
: … { … }
NavigatorAuction& NavigatorAuction::From(ExecutionContext* context,
Navigator& navigator) { … }
const char NavigatorAuction::kSupplementName[] = …;
ScriptPromise<IDLUndefined> NavigatorAuction::joinAdInterestGroup(
ScriptState* script_state,
AuctionAdInterestGroup* mutable_group,
std::optional<double> lifetime_seconds,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::joinAdInterestGroup(
ScriptState* script_state,
Navigator& navigator,
AuctionAdInterestGroup* group,
double duration_seconds,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::joinAdInterestGroup(
ScriptState* script_state,
Navigator& navigator,
AuctionAdInterestGroup* group,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::leaveAdInterestGroup(
ScriptState* script_state,
const AuctionAdInterestGroupKey* group_key,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::leaveAdInterestGroupForDocument(
ScriptState* script_state,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::leaveAdInterestGroup(
ScriptState* script_state,
Navigator& navigator,
const AuctionAdInterestGroupKey* group_key,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::leaveAdInterestGroup(
ScriptState* script_state,
Navigator& navigator,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::clearOriginJoinedAdInterestGroups(
ScriptState* script_state,
const String owner_string,
const Vector<String> interest_groups_to_keep,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::clearOriginJoinedAdInterestGroups(
ScriptState* script_state,
Navigator& navigator,
const String owner,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::clearOriginJoinedAdInterestGroups(
ScriptState* script_state,
Navigator& navigator,
const String owner,
const Vector<String> interest_groups_to_keep,
ExceptionState& exception_state) { … }
void NavigatorAuction::updateAdInterestGroups() { … }
void NavigatorAuction::updateAdInterestGroups(ScriptState* script_state,
Navigator& navigator,
ExceptionState& exception_state) { … }
namespace {
String CombineAuctionNonce(base::Uuid base_auction_nonce,
uint32_t auction_nonce_counter) { … }
}
ScriptPromise<IDLString> NavigatorAuction::createAuctionNonce(
ScriptState* script_state,
ExceptionState& exception_state) { … }
ScriptPromise<IDLString> NavigatorAuction::createAuctionNonce(
ScriptState* script_state,
Navigator& navigator,
ExceptionState& exception_state) { … }
ScriptPromise<IDLNullable<V8UnionFencedFrameConfigOrUSVString>>
NavigatorAuction::runAdAuction(ScriptState* script_state,
AuctionAdConfig* mutable_config,
ExceptionState& exception_state,
base::TimeTicks start_time) { … }
ScriptPromise<IDLNullable<V8UnionFencedFrameConfigOrUSVString>>
NavigatorAuction::runAdAuction(ScriptState* script_state,
Navigator& navigator,
AuctionAdConfig* config,
ExceptionState& exception_state) { … }
Vector<String> NavigatorAuction::adAuctionComponents(
ScriptState* script_state,
Navigator& navigator,
uint16_t num_ad_components,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUSVString> NavigatorAuction::deprecatedURNToURL(
ScriptState* script_state,
const String& uuid_url_string,
bool send_reports,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUSVString> NavigatorAuction::deprecatedURNToURL(
ScriptState* script_state,
Navigator& navigator,
const V8UnionFencedFrameConfigOrUSVString* urn_or_config,
bool send_reports,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::deprecatedReplaceInURN(
ScriptState* script_state,
const String& uuid_url_string,
const Vector<std::pair<String, String>>& replacements,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> NavigatorAuction::deprecatedReplaceInURN(
ScriptState* script_state,
Navigator& navigator,
const V8UnionFencedFrameConfigOrUSVString* urn_or_config,
const Vector<std::pair<String, String>>& replacements,
ExceptionState& exception_state) { … }
ScriptPromise<Ads> NavigatorAuction::createAdRequest(
ScriptState* script_state,
const AdRequestConfig* config,
ExceptionState& exception_state) { … }
ScriptPromise<Ads> NavigatorAuction::createAdRequest(
ScriptState* script_state,
Navigator& navigator,
const AdRequestConfig* config,
ExceptionState& exception_state) { … }
void NavigatorAuction::AdsRequested(ScriptPromiseResolver<Ads>* resolver,
const WTF::String&) { … }
ScriptPromise<IDLString> NavigatorAuction::finalizeAd(
ScriptState* script_state,
const Ads* ads,
const AuctionAdConfig* config,
ExceptionState& exception_state) { … }
ScriptPromise<IDLString> NavigatorAuction::finalizeAd(
ScriptState* script_state,
Navigator& navigator,
const Ads* ads,
const AuctionAdConfig* config,
ExceptionState& exception_state) { … }
void NavigatorAuction::FinalizeAdComplete(
ScriptPromiseResolver<IDLString>* resolver,
const std::optional<KURL>& creative_url) { … }
void NavigatorAuction::StartJoin(PendingJoin&& pending_join) { … }
void NavigatorAuction::JoinComplete(
bool is_cross_origin,
ScriptPromiseResolver<IDLUndefined>* resolver,
bool failed_well_known_check) { … }
void NavigatorAuction::StartLeave(PendingLeave&& pending_leave) { … }
void NavigatorAuction::LeaveComplete(
bool is_cross_origin,
ScriptPromiseResolver<IDLUndefined>* resolver,
bool failed_well_known_check) { … }
void NavigatorAuction::StartClear(PendingClear&& pending_clear) { … }
void NavigatorAuction::ClearComplete(
bool is_cross_origin,
ScriptPromiseResolver<IDLUndefined>* resolver,
bool failed_well_known_check) { … }
void NavigatorAuction::AuctionHandle::AuctionComplete(
ScriptPromiseResolver<IDLNullable<V8UnionFencedFrameConfigOrUSVString>>*
resolver,
std::unique_ptr<ScopedAbortState> scoped_abort_state,
base::TimeTicks start_time,
bool is_server_auction,
bool aborted_by_script,
const std::optional<FencedFrame::RedactedFencedFrameConfig>&
result_config) { … }
bool NavigatorAuction::AuctionHandle::MaybeResolveAuction() { … }
void NavigatorAuction::GetURLFromURNComplete(
ScriptPromiseResolver<IDLUSVString>* resolver,
const std::optional<KURL>& decoded_url) { … }
void NavigatorAuction::ReplaceInURNComplete(
ScriptPromiseResolver<IDLUndefined>* resolver) { … }
bool NavigatorAuction::canLoadAdAuctionFencedFrame(ScriptState* script_state) { … }
bool NavigatorAuction::canLoadAdAuctionFencedFrame(ScriptState* script_state,
Navigator& navigator) { … }
bool NavigatorAuction::deprecatedRunAdAuctionEnforcesKAnonymity(
ScriptState* script_state,
Navigator&) { … }
ProtectedAudience* NavigatorAuction::protectedAudience(
ScriptState* script_state,
Navigator& navigator) { … }
ScriptPromise<AdAuctionData> NavigatorAuction::getInterestGroupAdAuctionData(
ScriptState* script_state,
const AdAuctionDataConfig* config,
ExceptionState& exception_state,
base::TimeTicks start_time) { … }
void NavigatorAuction::GetInterestGroupAdAuctionDataComplete(
base::TimeTicks start_time,
ScriptPromiseResolver<AdAuctionData>* resolver,
mojo_base::BigBuffer data,
const std::optional<base::Uuid>& request_id,
const WTF::String& error_message) { … }
ScriptPromise<AdAuctionData> NavigatorAuction::getInterestGroupAdAuctionData(
ScriptState* script_state,
Navigator& navigator,
const AdAuctionDataConfig* config,
ExceptionState& exception_state) { … }
}