chromium/components/autofill/core/browser/webdata/autofill_change.h

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

#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__
#define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__

#include <concepts>
#include <string>
#include <vector>

#include "base/check.h"
#include "components/autofill/core/browser/data_model/autofill_data_model.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/credit_card.h"
#include "components/autofill/core/browser/data_model/iban.h"
#include "components/autofill/core/browser/webdata/autocomplete/autocomplete_entry.h"
#include "components/autofill/core/browser/webdata/payments/payments_autofill_table.h"
#include "third_party/abseil-cpp/absl/types/variant.h"

namespace autofill {

class AutocompleteChange {};

AutocompleteChangeList;

// Change notification details for Autofill related changes.
// TODO(crbug.com/40928146): Update the name for `AutofillDataModelChange` as it
// now captures non data model changes.
template <typename DataType, typename KeyType>
  requires std::derived_from<DataType, AutofillDataModel> ||
           std::same_as<DataType, ServerCvc>
class AutofillDataModelChange {};

// Identified by `AutofillProfile::guid()`.
AutofillProfileChange;

// Identified by `CreditCard::guid()` for local cards and
// `CreditCard::server_id()` for server cards.
// TODO(crbug.com/40927747): For server cards, an instrument id should be used.
CreditCardChange;

// Identified by `Iban::guid()` for local IBANs and `Iban::instrument_id()` for
// server IBANs.
IbanChange;

// Identified by `ServerCvc::instrument_id`.
ServerCvcChange;

}  // namespace autofill

#endif  // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_CHANGE_H__