#include "components/autofill/core/browser/webdata/addresses/autofill_profile_sync_difference_tracker.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/autofill_profile_comparator.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/webdata/addresses/address_autofill_table.h"
#include "components/autofill/core/browser/webdata/addresses/autofill_profile_sync_bridge.h"
#include "components/autofill/core/browser/webdata/addresses/autofill_profile_sync_util.h"
#include "components/sync/model/model_error.h"
namespace autofill {
optional;
ModelError;
#undef RETURN_IF_ERROR
#define RETURN_IF_ERROR(x) …
AutofillProfileSyncDifferenceTracker::AutofillProfileSyncDifferenceTracker(
AddressAutofillTable* table)
: … { … }
AutofillProfileSyncDifferenceTracker::~AutofillProfileSyncDifferenceTracker() =
default;
optional<ModelError>
AutofillProfileSyncDifferenceTracker::IncorporateRemoteProfile(
AutofillProfile remote) { … }
optional<ModelError>
AutofillProfileSyncDifferenceTracker::IncorporateRemoteDelete(
const std::string& storage_key) { … }
optional<ModelError> AutofillProfileSyncDifferenceTracker::FlushToLocal(
base::OnceClosure autofill_changes_callback) { … }
optional<ModelError> AutofillProfileSyncDifferenceTracker::FlushToSync(
std::vector<AutofillProfile>* profiles_to_upload_to_sync,
std::vector<std::string>* profiles_to_delete_from_sync) { … }
optional<AutofillProfile> AutofillProfileSyncDifferenceTracker::ReadEntry(
const std::string& storage_key) { … }
optional<ModelError> AutofillProfileSyncDifferenceTracker::DeleteFromLocal(
const std::string& storage_key) { … }
std::map<std::string, AutofillProfile>*
AutofillProfileSyncDifferenceTracker::GetLocalOnlyEntries() { … }
bool AutofillProfileSyncDifferenceTracker::
InitializeLocalOnlyEntriesIfNeeded() { … }
AutofillProfileInitialSyncDifferenceTracker::
AutofillProfileInitialSyncDifferenceTracker(AddressAutofillTable* table)
: … { … }
AutofillProfileInitialSyncDifferenceTracker::
~AutofillProfileInitialSyncDifferenceTracker() = default;
optional<ModelError>
AutofillProfileInitialSyncDifferenceTracker::IncorporateRemoteDelete(
const std::string& storage_key) { … }
optional<ModelError> AutofillProfileInitialSyncDifferenceTracker::FlushToSync(
std::vector<AutofillProfile>* profiles_to_upload_to_sync,
std::vector<std::string>* profiles_to_delete_from_sync) { … }
optional<ModelError>
AutofillProfileInitialSyncDifferenceTracker::MergeSimilarEntriesForInitialSync(
const std::string& app_locale) { … }
optional<AutofillProfile>
AutofillProfileInitialSyncDifferenceTracker::FindMergeableLocalEntry(
const AutofillProfile& remote,
const AutofillProfileComparator& comparator) { … }
}