chromium/components/autofill/core/browser/autofill_profile_import_process.h

// Copyright 2021 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_AUTOFILL_PROFILE_IMPORT_PROCESS_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_IMPORT_PROCESS_H_

#include <optional>
#include <string>
#include <vector>

#include "base/containers/flat_map.h"
#include "base/memory/raw_ptr.h"
#include "components/autofill/core/browser/autofill_client.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/field_types.h"
#include "url/origin.h"

namespace autofill {

class AddressDataManager;

// Specifies the type of a profile form import.
enum class AutofillProfileImportType {};

// Specifies the status of the imported phone number.
enum class PhoneImportStatus {};

// Metadata about the import, which is passed through from FormDataImporter to
// ProfileImportProcess. This is required to do metric collection, depending on
// the user's decision to (not) import, based on how we construct the candidate
// profile in FormDataImporter.
// Besides metrics, it is also required to avoid creating obvious quasi
// duplicates after autofilling a profile.
struct ProfileImportMetadata {};

// This class holds the state associated with the import of an AutofillProfile
// observed in a form submission and should be used as the follows:
//
// * An instance is created by supplying the observed profile, all already
//   existing profiles and the used locale.
//
// * Now, the import process awaits either a user decision or a
//   confirmation that the user wasn't prompted at all. This confirmation is
//   supplied by either calling `AcceptWithoutPrompt()`, `AcceptWithoutEdits()`,
//   `AcceptWithEdits()`, `Declined()` or `Ignore()`.
//
// * Finally, `ImportAffectedProfiles()` should be used to update the
//   profiles in the `AddressDataManager`.
//
// The instance of this class should contain all information needed to record
// metrics once an import process is finished.
class ProfileImportProcess {};

}  // namespace autofill

#endif  // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROFILE_IMPORT_PROCESS_H_