chromium/components/autofill/core/browser/data_model/autofill_offer_data.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// TODO(crbug.com/40932427): Refactor these methods and create separate
// constructors that are specific to each offer.
// static
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) {}

// static
// TODO(b/351080010): DEPRECATED, remove this function.
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) {}

// static
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)
    :{}

}  // namespace autofill