chromium/components/autofill/core/browser/webdata/addresses/contact_info_sync_util.cc

// Copyright 2022 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/webdata/addresses/contact_info_sync_util.h"

#include "base/hash/hash.h"
#include "base/memory/raw_ref.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/uuid.h"
#include "components/autofill/core/browser/country_type.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/geo/country_names.h"
#include "components/autofill/core/browser/profile_token_quality.h"
#include "components/autofill/core/common/autofill_features.h"

namespace autofill {

namespace {

ContactInfoSpecifics;

// Converts the verification status representation used in AutofillProfile to
// the one used in ContactInfoSpecifics.
ContactInfoSpecifics::VerificationStatus
ConvertProfileToSpecificsVerificationStatus(VerificationStatus status) {}

// Converts the verification status representation used in
// ContactInfoSpecifics to the one used in AutofillProfile.
VerificationStatus ConvertSpecificsToProfileVerificationStatus(
    ContactInfoSpecifics::VerificationStatus status) {}

class EntryTokenDeleter {};

// Returns a hash of the `profile`'s value for the given `type`. This hash is
// not persisted on the Autofill side, but used to detect changes by external
// integrators when the data gets synced back.
// Since the uploaded data contains the raw value too, this is not a privacy
// concern.
uint32_t GetProfileValueHash(const AutofillProfile& profile, FieldType type) {}

}  // namespace

// Helper class to simplify setting the value and metadata of
// ContactInfoSpecifics StringTokens from an AutofillProfile.
// Outside of the anonymous namespace to be befriended by `ProfileTokenQuality`.
class ContactInfoEntryDataSetter {};

// Helper class to set the info and verification status of an AutofillProfile
// from ContactInfoSpecifics StringTokens.
// Outside of the anonymous namespace to be befriended by `ProfileTokenQuality`.
class ContactInfoProfileSetter {};

sync_pb::ContactInfoSpecifics ContactInfoSpecificsFromAutofillProfile(
    const AutofillProfile& profile,
    const sync_pb::ContactInfoSpecifics& base_contact_info_specifics) {}

std::unique_ptr<syncer::EntityData>
CreateContactInfoEntityDataFromAutofillProfile(
    const AutofillProfile& profile,
    const sync_pb::ContactInfoSpecifics& base_contact_info_specifics) {}

std::optional<AutofillProfile> CreateAutofillProfileFromContactInfoSpecifics(
    const ContactInfoSpecifics& specifics) {}

bool AreContactInfoSpecificsValid(
    const sync_pb::ContactInfoSpecifics& specifics) {}

sync_pb::ContactInfoSpecifics TrimContactInfoSpecificsDataForCaching(
    const sync_pb::ContactInfoSpecifics& contact_info_specifics) {}

}  // namespace autofill