chromium/chrome/browser/sync/test/integration/autofill_helper.cc

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

#include "chrome/browser/sync/test/integration/autofill_helper.h"

#include <stddef.h>

#include <map>
#include <optional>
#include <ostream>
#include <sstream>
#include <utility>

#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/sequenced_task_runner.h"
#include "base/uuid.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/webdata_services/web_data_service_factory.h"
#include "components/autofill/core/browser/address_data_manager.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/country_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/payments_data_manager.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/personal_data_manager_test_utils.h"
#include "components/autofill/core/browser/webdata/autocomplete/autocomplete_entry.h"
#include "components/autofill/core/browser/webdata/autocomplete/autocomplete_table.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/webdata/common/web_database.h"

AutocompleteChangeList;
AutocompleteEntry;
AutocompleteKey;
AutofillProfile;
AutofillWebDataService;
AutofillWebDataServiceObserverOnDBSequence;
CreditCard;
FormFieldData;
PersonalDataManager;
WaitableEvent;
test;

namespace {

ACTION_P(SignalEvent, event) {}

class MockWebDataServiceObserver
    : public AutofillWebDataServiceObserverOnDBSequence {};

scoped_refptr<AutofillWebDataService> GetWebDataService(int index) {}

void WaitForCurrentTasksToComplete(
    scoped_refptr<base::SequencedTaskRunner> task_runner) {}

void RemoveKeyDontBlockForSync(int profile, const AutocompleteKey& key) {}

void GetAllAutocompleteEntriesOnDBSequence(
    AutofillWebDataService* wds,
    std::vector<AutocompleteEntry>* entries) {}

std::vector<AutocompleteEntry> GetAllAutocompleteEntries(
    AutofillWebDataService* wds) {}

bool ProfilesMatchImpl(
    const std::optional<unsigned int>& expected_count,
    int profile_a,
    const std::vector<const AutofillProfile*>& autofill_profiles_a,
    int profile_b,
    const std::vector<const AutofillProfile*>& autofill_profiles_b,
    std::ostream* os) {}

}  // namespace

namespace autofill_helper {

AutofillProfile CreateAutofillProfile(ProfileType type) {}

AutofillProfile CreateUniqueAutofillProfile() {}

PersonalDataManager* GetPersonalDataManager(int index) {}

void AddKeys(int profile, const std::set<AutocompleteKey>& keys) {}

void RemoveKey(int profile, const AutocompleteKey& key) {}

void RemoveKeys(int profile) {}

std::set<AutocompleteKey> GetAllKeys(int profile) {}

bool KeysMatch(int profile_a, int profile_b) {}

void SetCreditCards(int profile, std::vector<CreditCard>* credit_cards) {}

void AddProfile(int profile, const AutofillProfile& autofill_profile) {}

void RemoveProfile(int profile, const std::string& guid) {}

void UpdateProfile(int profile,
                   const std::string& guid,
                   autofill::FieldType type,
                   const std::u16string& value,
                   autofill::VerificationStatus status) {}

std::vector<const AutofillProfile*> GetAllAutoFillProfiles(int profile) {}

size_t GetProfileCount(int profile) {}

size_t GetKeyCount(int profile) {}

bool ProfilesMatch(int profile_a, int profile_b) {}

}  // namespace autofill_helper

AutocompleteKeysChecker::AutocompleteKeysChecker(int profile_a, int profile_b)
    :{}

bool AutocompleteKeysChecker::IsExitConditionSatisfied(std::ostream* os) {}

AutofillProfileChecker::AutofillProfileChecker(
    int profile_a,
    int profile_b,
    std::optional<unsigned int> expected_count)
    :{}

AutofillProfileChecker::~AutofillProfileChecker() {}
bool AutofillProfileChecker::Wait() {}

bool AutofillProfileChecker::IsExitConditionSatisfied(std::ostream* os) {}

void AutofillProfileChecker::OnAddressDataChanged() {}