#include "components/browsing_data/core/counters/autofill_counter.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/credit_card.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/browsing_data/core/pref_names.h"
#include "components/sync/service/sync_service.h"
#include "components/sync/service/sync_user_settings.h"
namespace {
bool IsAutocompleteSyncActive(const syncer::SyncService* sync_service) { … }
}
namespace browsing_data {
AutofillCounter::AutofillCounter(
scoped_refptr<autofill::AutofillWebDataService> web_data_service,
syncer::SyncService* sync_service)
: … { … }
AutofillCounter::~AutofillCounter() { … }
void AutofillCounter::OnInitialized() { … }
const char* AutofillCounter::GetPrefName() const { … }
void AutofillCounter::SetPeriodStartForTesting(
const base::Time& period_start_for_testing) { … }
void AutofillCounter::SetPeriodEndForTesting(
const base::Time& period_end_for_testing) { … }
void AutofillCounter::Count() { … }
void AutofillCounter::OnWebDataServiceRequestDone(
WebDataServiceBase::Handle handle,
std::unique_ptr<WDTypedResult> result) { … }
void AutofillCounter::CancelAllRequests() { … }
AutofillCounter::AutofillResult::AutofillResult(const AutofillCounter* source,
ResultInt num_suggestions,
ResultInt num_credit_cards,
ResultInt num_addresses,
bool autofill_sync_enabled_)
: … { … }
AutofillCounter::AutofillResult::~AutofillResult() { … }
}