#include "components/autofill/core/browser/data_model/autofill_offer_data.h"
#include <algorithm>
#include "base/ranges/algorithm.h"
#include "components/autofill/core/common/autofill_clock.h"
namespace autofill {
AutofillOfferData AutofillOfferData::GPayCardLinkedOffer(
int64_t offer_id,
base::Time expiry,
const std::vector<GURL>& merchant_origins,
const GURL& offer_details_url,
const DisplayStrings& display_strings,
const std::vector<int64_t>& eligible_instrument_id,
const std::string& offer_reward_amount) { … }
AutofillOfferData AutofillOfferData::FreeListingCouponOffer(
int64_t offer_id,
base::Time expiry,
const std::vector<GURL>& merchant_origins,
const GURL& offer_details_url,
const DisplayStrings& display_strings,
const std::string& promo_code,
bool is_merchant_wide,
std::optional<std::string> terms_and_conditions) { … }
AutofillOfferData AutofillOfferData::GPayPromoCodeOffer(
int64_t offer_id,
base::Time expiry,
const std::vector<GURL>& merchant_origins,
const GURL& offer_details_url,
const DisplayStrings& display_strings,
const std::string& promo_code) { … }
AutofillOfferData::AutofillOfferData() = default;
AutofillOfferData::~AutofillOfferData() = default;
AutofillOfferData::AutofillOfferData(const AutofillOfferData&) = default;
AutofillOfferData& AutofillOfferData::operator=(const AutofillOfferData&) =
default;
bool AutofillOfferData::operator==(
const AutofillOfferData& other_offer_data) const { … }
int AutofillOfferData::Compare(
const AutofillOfferData& other_offer_data) const { … }
bool AutofillOfferData::IsCardLinkedOffer() const { … }
bool AutofillOfferData::IsPromoCodeOffer() const { … }
bool AutofillOfferData::IsGPayPromoCodeOffer() const { … }
bool AutofillOfferData::IsActiveAndEligibleForOrigin(const GURL& origin) const { … }
AutofillOfferData::AutofillOfferData(
int64_t offer_id,
base::Time expiry,
const std::vector<GURL>& merchant_origins,
const GURL& offer_details_url,
const DisplayStrings& display_strings,
const std::vector<int64_t>& eligible_instrument_id,
const std::string& offer_reward_amount)
: … { … }
AutofillOfferData::AutofillOfferData(OfferType offer_type,
int64_t offer_id,
base::Time expiry,
const std::vector<GURL>& merchant_origins,
const GURL& offer_details_url,
const DisplayStrings& display_strings,
const std::string& promo_code)
: … { … }
}