chromium/components/autofill/core/browser/webdata/addresses/autofill_profile_sync_bridge.h

// Copyright 2018 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_ADDRESSES_AUTOFILL_PROFILE_SYNC_BRIDGE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_ADDRESSES_AUTOFILL_PROFILE_SYNC_BRIDGE_H_

#include <memory>
#include <optional>
#include <string>

#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "base/sequence_checker.h"
#include "base/supports_user_data.h"
#include "components/autofill/core/browser/webdata/autofill_change.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_backend.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service_observer.h"
#include "components/sync/model/data_type_sync_bridge.h"

namespace syncer {
class DataTypeLocalChangeProcessor;
class MetadataChangeList;
class ModelError;
}  // namespace syncer

namespace autofill {

class AddressAutofillTable;
class AutofillProfileSyncDifferenceTracker;
class AutofillSyncMetadataTable;
class AutofillWebDataService;
enum class AutofillProfileSyncChangeOrigin;

// Sync bridge implementation for AUTOFILL_PROFILE data type. Takes care of
// propagating local autofill profiles to other clients as well as incorporating
// profiles coming from other clients; and most notably resolving conflicts and
// merging duplicates.
//
// This is achieved by implementing the interface DataTypeSyncBridge, which
// ClientTagBasedDataTypeProcessor will use to interact, ultimately, with the
// sync server. See
// https://www.chromium.org/developers/design-documents/sync/model-api/#implementing-datatypesyncbridge
// for details.
class AutofillProfileSyncBridge
    : public base::SupportsUserData::Data,
      public AutofillWebDataServiceObserverOnDBSequence,
      public syncer::DataTypeSyncBridge {};

}  // namespace autofill

#endif  // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_ADDRESSES_AUTOFILL_PROFILE_SYNC_BRIDGE_H_