#include "content/browser/interest_group/interest_group_auction.h"
#include <stdint.h>
#include <algorithm>
#include <cmath>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/base64.h"
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/containers/flat_set.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/json/json_string_value_serializer.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_conversions.h"
#include "base/rand_util.h"
#include "base/ranges/algorithm.h"
#include "base/strings/escape.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "base/token.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_id_helper.h"
#include "base/types/optional_ref.h"
#include "base/uuid.h"
#include "content/browser/devtools/devtools_instrumentation.h"
#include "content/browser/fenced_frame/fenced_frame_config.h"
#include "content/browser/interest_group/ad_auction_page_data.h"
#include "content/browser/interest_group/additional_bid_result.h"
#include "content/browser/interest_group/additional_bids_util.h"
#include "content/browser/interest_group/auction_metrics_recorder.h"
#include "content/browser/interest_group/auction_nonce_manager.h"
#include "content/browser/interest_group/auction_process_manager.h"
#include "content/browser/interest_group/auction_url_loader_factory_proxy.h"
#include "content/browser/interest_group/auction_worklet_manager.h"
#include "content/browser/interest_group/debuggable_auction_worklet.h"
#include "content/browser/interest_group/for_debugging_only_report_util.h"
#include "content/browser/interest_group/header_direct_from_seller_signals.h"
#include "content/browser/interest_group/interest_group_auction_reporter.h"
#include "content/browser/interest_group/interest_group_caching_storage.h"
#include "content/browser/interest_group/interest_group_k_anonymity_manager.h"
#include "content/browser/interest_group/interest_group_manager_impl.h"
#include "content/browser/interest_group/interest_group_pa_report_util.h"
#include "content/browser/interest_group/interest_group_priority_util.h"
#include "content/browser/interest_group/interest_group_real_time_report_util.h"
#include "content/browser/interest_group/storage_interest_group.h"
#include "content/common/features.h"
#include "content/public/browser/auction_result.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
#include "content/services/auction_worklet/public/cpp/real_time_reporting.h"
#include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom-forward.h"
#include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h"
#include "content/services/auction_worklet/public/mojom/private_aggregation_request.mojom.h"
#include "content/services/auction_worklet/public/mojom/real_time_reporting.mojom.h"
#include "content/services/auction_worklet/public/mojom/seller_worklet.mojom.h"
#include "crypto/sha2.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/associated_receiver_set.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "net/third_party/quiche/src/quiche/oblivious_http/buffers/oblivious_http_response.h"
#include "services/data_decoder/public/cpp/data_decoder.h"
#include "services/network/public/mojom/client_security_state.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/features_generated.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/auction_config.h"
#include "third_party/blink/public/common/interest_group/devtools_serialization.h"
#include "third_party/blink/public/common/interest_group/interest_group.h"
#include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
#include "third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace content {
CONTENT_EXPORT BASE_FEATURE(…);
namespace {
constexpr base::TimeDelta kMaxPerBuyerTimeout = …;
constexpr base::TimeDelta kGroupFreshnessMin = …;
constexpr base::TimeDelta kGroupFreshnessMax = …;
constexpr int kGroupFreshnessBuckets = …;
constexpr base::TimeDelta kMinUpdateIfOlderThanHistogram = …;
constexpr base::TimeDelta kMaxUpdateIfOlderThanHistogram = …;
constexpr size_t kUpdateIfOlderThanBuckets = …;
constexpr char kInvalidServerResponseReasonUMAName[] = …;
enum class InvalidServerResponseReason { … };
std::string DirectFromSellerSignalsHeaderAdSlotNoMatchError(
const std::string& ad_slot) { … }
bool IsUrlValid(const GURL& url) { … }
bool IsKAnon(const base::flat_set<std::string>& kanon_keys,
const std::string& key) { … }
bool IsSelectedReportingIdValid(
base::optional_ref<const std::vector<std::string>> selectable_ids,
const std::string& selected_id) { … }
std::vector<auction_worklet::mojom::KAnonKeyPtr> KAnonKeysToMojom(
const base::flat_set<std::string>& kanon_keys) { … }
const blink::InterestGroup::Ad* FindMatchingAd(
const std::vector<blink::InterestGroup::Ad>& ads,
const base::flat_set<std::string>& kanon_keys,
const blink::InterestGroup& interest_group,
auction_worklet::mojom::BidRole bid_role,
base::optional_ref<const std::string>
selected_buyer_and_seller_reporting_id,
bool is_component_ad,
const blink::AdDescriptor& ad_descriptor) { … }
bool IsValidBid(double bid) { … }
bool IsValidMultiBid(
auction_worklet::mojom::KAnonymityBidMode kanon_mode,
AuctionMetricsRecorder* auction_metrics_recorder,
const std::vector<auction_worklet::mojom::BidderWorkletBidPtr>& mojo_bids,
uint16_t multi_bid_limit) { … }
struct BidStatesDescByPriority { … };
struct BidStatesDescByPriorityAndGroupByJoinOrigin { … };
bool IsBidRoleUsedForWinner(
auction_worklet::mojom::KAnonymityBidMode kanon_mode,
auction_worklet::mojom::BidRole bid_role) { … }
static const char* ScoreAdTraceEventName(const InterestGroupAuction::Bid& bid) { … }
bool GroupSatisfiesAllCapabilities(const blink::InterestGroup& interest_group,
blink::SellerCapabilitiesType capabilities,
const url::Origin& seller) { … }
bool CanReportPaBuyersValue(const blink::InterestGroup& interest_group,
blink::SellerCapabilities capability,
const url::Origin& seller) { … }
std::optional<absl::uint128> BucketBaseForReportPaBuyers(
const blink::AuctionConfig& config,
const url::Origin& buyer) { … }
std::optional<blink::AuctionConfig::NonSharedParams::AuctionReportBuyersConfig>
ReportBuyersConfigForPaBuyers(
blink::AuctionConfig::NonSharedParams::BuyerReportType buyer_report_type,
const blink::AuctionConfig& config) { … }
void TakePrivateAggregationRequestsForBidState(
std::unique_ptr<InterestGroupAuction::BidState>& state,
bool is_component_auction,
const InterestGroupAuction::BidState* winner,
const InterestGroupAuction::BidState* non_kanon_winner,
const InterestGroupAuction::PostAuctionSignals& signals,
const std::optional<InterestGroupAuction::PostAuctionSignals>&
top_level_signals,
std::map<PrivateAggregationKey,
InterestGroupAuctionReporter::PrivateAggregationRequests>&
private_aggregation_requests_reserved,
std::map<std::string,
InterestGroupAuctionReporter::PrivateAggregationRequests>&
private_aggregation_requests_non_reserved) { … }
void TakeRealTimeContributionsForBidState(
InterestGroupAuction::BidState& state,
std::map<url::Origin, InterestGroupAuction::RealTimeReportingContributions>&
contributions) { … }
bool IsOriginInDebugReportCooldownOrLockout(
const url::Origin& origin,
const std::optional<DebugReportLockoutAndCooldowns>&
debug_report_lockout_and_cooldowns,
const base::Time now) { … }
bool SampleDebugReport(
const url::Origin& origin,
DebugReportLockoutAndCooldowns& new_debug_report_lockout_and_cooldowns) { … }
bool KeepDebugReport(
const url::Origin& origin,
std::optional<DebugReportLockoutAndCooldowns>&
debug_report_lockout_and_cooldowns,
DebugReportLockoutAndCooldowns& new_debug_report_lockout_and_cooldowns) { … }
void TakeDebugReportUrlsForBidState(
std::unique_ptr<InterestGroupAuction::BidState>& bid_state,
const InterestGroupAuction::BidState* winner,
const InterestGroupAuction::PostAuctionSignals& signals,
const std::optional<InterestGroupAuction::PostAuctionSignals>&
top_level_signals,
const url::Origin& bidder,
const url::Origin& seller,
const std::optional<url::Origin>& top_level_seller,
std::optional<DebugReportLockoutAndCooldowns>&
debug_report_lockout_and_cooldowns,
DebugReportLockoutAndCooldowns& new_debug_report_lockout_and_cooldowns,
std::vector<GURL>& debug_win_report_urls,
std::vector<GURL>& debug_loss_report_urls) { … }
std::optional<base::TimeDelta> PerBuyerTimeoutHelper(
const url::Origin& buyer,
const blink::AuctionConfig::MaybePromiseBuyerTimeouts& buyer_timeouts) { … }
std::optional<base::TimeDelta> PerBuyerTimeout(
const url::Origin& buyer,
const blink::AuctionConfig& auction_config) { … }
std::optional<base::TimeDelta> PerBuyerCumulativeTimeout(
const url::Origin& buyer,
const blink::AuctionConfig& auction_config) { … }
std::optional<blink::AdCurrency> PerBuyerCurrency(
const url::Origin& buyer,
const blink::AuctionConfig& auction_config) { … }
}
InterestGroupAuction::PostAuctionSignals::PostAuctionSignals() = default;
InterestGroupAuction::PostAuctionSignals::PostAuctionSignals(
double winning_bid,
std::optional<blink::AdCurrency> winning_bid_currency,
bool made_winning_bid)
: … { … }
InterestGroupAuction::PostAuctionSignals::PostAuctionSignals(
double winning_bid,
std::optional<blink::AdCurrency> winning_bid_currency,
bool made_winning_bid,
double highest_scoring_other_bid,
std::optional<blink::AdCurrency> highest_scoring_other_bid_currency,
bool made_highest_scoring_other_bid)
: … { … }
InterestGroupAuction::PostAuctionSignals::~PostAuctionSignals() = default;
void InterestGroupAuction::PostAuctionSignals::FillWinningBidInfo(
const url::Origin& owner,
std::optional<url::Origin> winner_owner,
double winning_bid,
std::optional<double> winning_bid_in_seller_currency,
const std::optional<blink::AdCurrency>& seller_currency,
bool& out_made_winning_bid,
double& out_winning_bid,
std::optional<blink::AdCurrency>& out_winning_bid_currency) { … }
void InterestGroupAuction::PostAuctionSignals::
FillRelevantHighestScoringOtherBidInfo(
const url::Origin& owner,
std::optional<url::Origin> highest_scoring_other_bid_owner,
double highest_scoring_other_bid,
std::optional<double> highest_scoring_other_bid_in_seller_currency,
const std::optional<blink::AdCurrency>& seller_currency,
bool& out_made_highest_scoring_other_bid,
double& out_highest_scoring_other_bid,
std::optional<blink::AdCurrency>&
out_highest_scoring_other_bid_currency) { … }
InterestGroupAuction::BidState::~BidState() { … }
InterestGroupAuction::BidState::BidState(BidState&&) = default;
InterestGroupAuction::BidState::BidState(
const SingleStorageInterestGroup&& bidder)
: … { … }
void InterestGroupAuction::BidState::BeginTracing() { … }
void InterestGroupAuction::BidState::EndTracing() { … }
InterestGroupAuction::Bid::Bid(
auction_worklet::mojom::BidRole bid_role,
std::string ad_metadata,
double bid,
std::optional<blink::AdCurrency> bid_currency,
std::optional<double> ad_cost,
blink::AdDescriptor ad_descriptor,
std::vector<blink::AdDescriptor> ad_component_descriptors,
std::optional<uint16_t> modeling_signals,
base::TimeDelta bid_duration,
std::optional<uint32_t> bidding_signals_data_version,
const blink::InterestGroup::Ad* bid_ad,
std::optional<std::string> selected_buyer_and_seller_reporting_id,
BidState* bid_state,
InterestGroupAuction* auction)
: … { … }
InterestGroupAuction::Bid::Bid(Bid&) = default;
InterestGroupAuction::Bid::~Bid() { … }
void InterestGroupAuction::Bid::BeginTracingForScoring() { … }
void InterestGroupAuction::Bid::EndTracingForScoring() { … }
std::vector<GURL> InterestGroupAuction::Bid::GetAdComponentUrls() const { … }
blink::AdDescriptor
InterestGroupAuction::Bid::GetAdDescriptorWithReplacements() { … }
std::vector<blink::AdDescriptor>
InterestGroupAuction::Bid::GetComponentAdDescriptorsWithReplacements() { … }
InterestGroupAuction::ScoredBid::ScoredBid(
double score,
std::optional<uint32_t> scoring_signals_data_version,
std::unique_ptr<Bid> bid,
std::optional<double> bid_in_seller_currency,
auction_worklet::mojom::ComponentAuctionModifiedBidParamsPtr
component_auction_modified_bid_params)
: … { … }
InterestGroupAuction::ScoredBid::~ScoredBid() = default;
class InterestGroupAuction::BuyerHelper
: public auction_worklet::mojom::GenerateBidClient { … };
InterestGroupAuction::InterestGroupAuction(
auction_worklet::mojom::KAnonymityBidMode kanon_mode,
const blink::AuctionConfig* config,
const InterestGroupAuction* parent,
AuctionMetricsRecorder* auction_metrics_recorder,
AuctionWorkletManager* auction_worklet_manager,
AuctionNonceManager* auction_nonce_manager,
InterestGroupManagerImpl* interest_group_manager,
GetDataDecoderCallback get_data_decoder_callback,
base::Time auction_start_time,
IsInterestGroupApiAllowedCallback is_interest_group_api_allowed_callback,
base::RepeatingCallback<
void(const PrivateAggregationRequests& private_aggregation_requests)>
maybe_log_private_aggregation_web_features_callback)
: … { … }
InterestGroupAuction::~InterestGroupAuction() { … }
void InterestGroupAuction::StartLoadInterestGroupsPhase(
AuctionPhaseCompletionCallback load_interest_groups_phase_callback) { … }
void InterestGroupAuction::StartBiddingAndScoringPhase(
std::optional<DebugReportLockoutAndCooldowns>
debug_report_lockout_and_cooldowns,
base::OnceClosure on_seller_receiver_callback,
AuctionPhaseCompletionCallback bidding_and_scoring_phase_callback) { … }
void InterestGroupAuction::HandleComponentServerResponse(
uint32_t pos,
mojo_base::BigBuffer response,
AdAuctionPageData& ad_auction_page_data) { … }
void InterestGroupAuction::HandleServerResponse(
mojo_base::BigBuffer response,
AdAuctionPageData& ad_auction_page_data) { … }
bool InterestGroupAuction::HandleServerResponseImpl(
mojo_base::BigBuffer response,
AdAuctionPageData& ad_auction_page_data) { … }
std::unique_ptr<InterestGroupAuctionReporter>
InterestGroupAuction::CreateReporter(
BrowserContext* browser_context,
PrivateAggregationManager* private_aggregation_manager,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
AdAuctionPageDataCallback ad_auction_page_data_callback,
std::unique_ptr<blink::AuctionConfig> auction_config,
const url::Origin& main_frame_origin,
const url::Origin& frame_origin,
network::mojom::ClientSecurityStatePtr client_security_state,
blink::InterestGroupSet interest_groups_that_bid) { … }
void InterestGroupAuction::NotifyConfigPromisesResolved() { … }
void InterestGroupAuction::NotifyComponentConfigPromisesResolved(uint32_t pos) { … }
void InterestGroupAuction::NotifyAdditionalBidsConfig(
AdAuctionPageData& auction_page_data) { … }
void InterestGroupAuction::NotifyComponentAdditionalBidsConfig(
uint32_t pos,
AdAuctionPageData& auction_page_data) { … }
void InterestGroupAuction::NotifyDirectFromSellerSignalsHeaderAdSlotConfig(
AdAuctionPageData& auction_page_data,
const std::optional<std::string>&
direct_from_seller_signals_header_ad_slot) { … }
void InterestGroupAuction::
NotifyComponentDirectFromSellerSignalsHeaderAdSlotConfig(
uint32_t pos,
AdAuctionPageData& auction_page_data,
const std::optional<std::string>&
direct_from_seller_signals_header_ad_slot) { … }
void InterestGroupAuction::ClosePipes() { … }
size_t InterestGroupAuction::NumPotentialBidders() const { … }
void InterestGroupAuction::GetInterestGroupsThatBidAndReportBidCounts(
blink::InterestGroupSet& interest_groups) const { … }
std::optional<blink::AdSize> InterestGroupAuction::RequestedAdSize() const { … }
std::string_view GetRejectReasonString(
const auction_worklet::mojom::RejectReason reject_reason) { … }
GURL InterestGroupAuction::FillPostAuctionSignals(
const GURL& url,
const PostAuctionSignals& signals,
const std::optional<PostAuctionSignals>& top_level_signals,
const std::optional<auction_worklet::mojom::RejectReason> reject_reason) { … }
bool InterestGroupAuction::ReportPaBuyersValueIfAllowed(
const blink::InterestGroup& interest_group,
blink::SellerCapabilities capability,
blink::AuctionConfig::NonSharedParams::BuyerReportType buyer_report_type,
int value) { … }
bool InterestGroupAuction::HasNonKAnonWinner() const { … }
bool InterestGroupAuction::NonKAnonWinnerIsKAnon() const { … }
bool InterestGroupAuction::HasInterestGroups() const { … }
SubresourceUrlBuilder* InterestGroupAuction::SubresourceUrlBuilderIfReady() { … }
void InterestGroupAuction::
TakeDebugReportUrlsAndFillInPrivateAggregationRequests(
std::vector<GURL>& debug_win_report_urls,
std::vector<GURL>& debug_loss_report_urls) { … }
std::map<PrivateAggregationKey,
InterestGroupAuction::PrivateAggregationRequests>
InterestGroupAuction::TakeReservedPrivateAggregationRequests() { … }
std::map<std::string, InterestGroupAuction::PrivateAggregationRequests>
InterestGroupAuction::TakeNonReservedPrivateAggregationRequests() { … }
std::map<url::Origin, InterestGroupAuction::RealTimeReportingContributions>
InterestGroupAuction::TakeRealTimeReportingContributions() { … }
std::vector<std::string> InterestGroupAuction::TakeErrors() { … }
void InterestGroupAuction::TakePostAuctionUpdateOwners(
std::vector<url::Origin>& owners) { … }
bool InterestGroupAuction::ReportInterestGroupCount(
const blink::InterestGroup& interest_group,
size_t count) { … }
bool InterestGroupAuction::ReportBidCount(
const blink::InterestGroup& interest_group,
size_t count) { … }
void InterestGroupAuction::ReportTrustedSignalsFetchLatency(
const blink::InterestGroup& interest_group,
base::TimeDelta trusted_signals_fetch_latency) { … }
void InterestGroupAuction::ReportBiddingLatency(
const blink::InterestGroup& interest_group,
base::TimeDelta bidding_latency) { … }
base::flat_set<url::Origin> InterestGroupAuction::GetSellersAndBuyers() { … }
base::flat_set<std::string> InterestGroupAuction::GetKAnonKeysToJoin() const { … }
void InterestGroupAuction::MaybeLogPrivateAggregationWebFeatures(
const std::vector<auction_worklet::mojom::PrivateAggregationRequestPtr>&
private_aggregation_requests) { … }
bool InterestGroupAuction::
BlockDueToDisallowedCrossOriginTrustedSellerSignals() { … }
const InterestGroupAuction::LeaderInfo& InterestGroupAuction::leader_info()
const { … }
InterestGroupAuction::ScoredBid*
InterestGroupAuction::top_kanon_enforced_bid() { … }
const InterestGroupAuction::ScoredBid*
InterestGroupAuction::top_kanon_enforced_bid() const { … }
InterestGroupAuction::ScoredBid*
InterestGroupAuction::top_non_kanon_enforced_bid() { … }
const InterestGroupAuction::ScoredBid*
InterestGroupAuction::top_non_kanon_enforced_bid() const { … }
void InterestGroupAuction::ComputePostAuctionSignals(
const url::Origin& bid_owner,
PostAuctionSignals& signals_out,
std::optional<PostAuctionSignals>& top_level_signals_out) { … }
uint16_t InterestGroupAuction::GetBuyerMultiBidLimit(const url::Origin& buyer) { … }
std::optional<uint16_t> InterestGroupAuction::GetBuyerExperimentId(
const blink::AuctionConfig& config,
const url::Origin& buyer) { … }
std::string InterestGroupAuction::CreateTrustedBiddingSignalsSlotSizeParam(
const blink::AuctionConfig& config,
blink::InterestGroup::TrustedBiddingSignalsSlotSizeMode
trusted_bidding_signals_slot_size_mode) { … }
std::optional<std::string> InterestGroupAuction::GetPerBuyerSignals(
const blink::AuctionConfig& config,
const url::Origin& buyer) { … }
std::optional<GURL> InterestGroupAuction::GetDirectFromSellerAuctionSignals(
const SubresourceUrlBuilder* subresource_url_builder) { … }
std::optional<std::string>
InterestGroupAuction::GetDirectFromSellerAuctionSignalsHeaderAdSlot(
const HeaderDirectFromSellerSignals::Result& signals) { … }
std::optional<GURL> InterestGroupAuction::GetDirectFromSellerPerBuyerSignals(
const SubresourceUrlBuilder* subresource_url_builder,
const url::Origin& owner) { … }
std::optional<std::string>
InterestGroupAuction::GetDirectFromSellerPerBuyerSignalsHeaderAdSlot(
const HeaderDirectFromSellerSignals::Result& signals,
const url::Origin& owner) { … }
std::optional<GURL> InterestGroupAuction::GetDirectFromSellerSellerSignals(
const SubresourceUrlBuilder* subresource_url_builder) { … }
std::optional<std::string>
InterestGroupAuction::GetDirectFromSellerSellerSignalsHeaderAdSlot(
const HeaderDirectFromSellerSignals::Result& signals) { … }
const std::vector<blink::AuctionConfig::AdKeywordReplacement>&
InterestGroupAuction::GetDeprecatedRenderURLReplacements() { … }
InterestGroupAuction::LeaderInfo::LeaderInfo() = default;
InterestGroupAuction::LeaderInfo::~LeaderInfo() = default;
void InterestGroupAuction::OnInterestGroupRead(
scoped_refptr<StorageInterestGroups> read_interest_groups) { … }
void InterestGroupAuction::OnComponentInterestGroupsRead(
AuctionMap::iterator component_auction,
bool success) { … }
void InterestGroupAuction::OnOneLoadCompleted() { … }
void InterestGroupAuction::OnStartLoadInterestGroupsPhaseComplete(
AuctionResult auction_result) { … }
void InterestGroupAuction::OnComponentSellerWorkletReceived() { … }
void InterestGroupAuction::RequestSellerWorklet() { … }
void InterestGroupAuction::OnSellerWorkletReceived() { … }
void InterestGroupAuction::ScoreQueuedBidsIfReady() { … }
void InterestGroupAuction::HandleUpdateIfOlderThan(
const blink::InterestGroup& interest_group,
std::optional<base::TimeDelta> update_if_older_than) { … }
void InterestGroupAuction::HandleAdditionalBidError(AdditionalBidResult result,
std::string error) { … }
void InterestGroupAuction::DecodeAdditionalBidsIfReady() { … }
void InterestGroupAuction::HandleDecodedSignedAdditionalBid(
data_decoder::DataDecoder::ValueOrError result) { … }
void InterestGroupAuction::HandleDecodedAdditionalBid(
const std::vector<SignedAdditionalBidSignature>& signatures,
const std::vector<size_t>& valid_signatures,
data_decoder::DataDecoder::ValueOrError result) { … }
void InterestGroupAuction::OnSellerWorkletFatalError(
AuctionWorkletManager::FatalErrorType fatal_error_type,
const std::vector<std::string>& errors) { … }
bool InterestGroupAuction::IsBuyerOptedInToRealTimeReporting(
const url::Origin& owner) { … }
void InterestGroupAuction::MaybeAddScriptFailureRealTimeContribution(
bool is_buyer,
const url::Origin& origin) { … }
void InterestGroupAuction::OnComponentAuctionComplete(
InterestGroupAuction* component_auction,
bool success) { … }
std::unique_ptr<InterestGroupAuction::Bid>
InterestGroupAuction::CreateBidFromComponentAuctionWinner(
const ScoredBid* scored_bid,
auction_worklet::mojom::BidRole bid_role) { … }
void InterestGroupAuction::OnScoringDependencyDone() { … }
void InterestGroupAuction::ScoreBidIfReady(std::unique_ptr<Bid> bid) { … }
void InterestGroupAuction::ScoreBid(std::unique_ptr<Bid> bid) { … }
bool InterestGroupAuction::ValidateScoreBidCompleteResult(
double score,
auction_worklet::mojom::ComponentAuctionModifiedBidParams*
component_auction_modified_bid_params,
std::optional<double> bid_in_seller_currency,
const std::optional<GURL>& debug_loss_report_url,
const std::optional<GURL>& debug_win_report_url,
const PrivateAggregationRequests& pa_requests,
const RealTimeReportingContributions& real_time_contributions) { … }
void InterestGroupAuction::OnScoreAdComplete(
double score,
auction_worklet::mojom::RejectReason reject_reason,
auction_worklet::mojom::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,
PrivateAggregationRequests pa_requests,
RealTimeReportingContributions real_time_contributions,
base::TimeDelta scoring_latency,
auction_worklet::mojom::ScoreAdDependencyLatenciesPtr
score_ad_dependency_latencies,
const std::vector<std::string>& errors) { … }
void InterestGroupAuction::UpdateAuctionLeaders(
std::unique_ptr<Bid> bid,
double score,
auction_worklet::mojom::ComponentAuctionModifiedBidParamsPtr
component_auction_modified_bid_params,
std::optional<double> bid_in_seller_currency,
std::optional<uint32_t> scoring_signals_data_version,
LeaderInfo& leader_info) { … }
void InterestGroupAuction::OnNewHighestScoringOtherBid(
double score,
double bid_value,
std::optional<double> bid_in_seller_currency,
const url::Origin* owner,
LeaderInfo& leader_info) { … }
std::optional<base::TimeDelta> InterestGroupAuction::SellerTimeout() { … }
void InterestGroupAuction::MaybeCompleteBiddingAndScoringPhase() { … }
void InterestGroupAuction::OnBiddingAndScoringComplete(
AuctionResult auction_result,
const std::vector<std::string>& errors) { … }
auction_worklet::mojom::ComponentAuctionOtherSellerPtr
InterestGroupAuction::GetOtherSellerParam(const Bid& bid) const { … }
AuctionWorkletManager::WorkletKey InterestGroupAuction::BidderWorkletKey(
BidState& bid_state) { … }
const std::string& InterestGroupAuction::GetTrustedBiddingSignalsSlotSizeParam(
blink::InterestGroup::TrustedBiddingSignalsSlotSizeMode
trusted_bidding_signals_slot_size_mode) { … }
void InterestGroupAuction::OnDecompressedServerResponse(
AdAuctionRequestContext* request_context,
base::expected<mojo_base::BigBuffer, std::string> result) { … }
void InterestGroupAuction::OnParsedServerResponse(
AdAuctionRequestContext* request_context,
data_decoder::DataDecoder::ValueOrError result) { … }
bool InterestGroupAuction::OnParsedServerResponseImpl(
AdAuctionRequestContext* request_context,
data_decoder::DataDecoder::ValueOrError result) { … }
void InterestGroupAuction::OnLoadedWinningGroup(
BiddingAndAuctionResponse response,
std::optional<SingleStorageInterestGroup> maybe_group) { … }
void InterestGroupAuction::OnLoadedWinningGroupImpl(
BiddingAndAuctionResponse response,
std::optional<SingleStorageInterestGroup> maybe_group) { … }
void InterestGroupAuction::CreateBidFromServerResponse() { … }
void InterestGroupAuction::OnDirectFromSellerSignalHeaderAdSlotResolved(
std::string ad_slot,
scoped_refptr<HeaderDirectFromSellerSignals::Result> signals) { … }
void InterestGroupAuction::UpdateIgSizeMetrics(
const std::vector<SingleStorageInterestGroup>& interest_groups) { … }
}