#include "chrome/browser/extensions/api/autofill_private/autofill_private_event_router.h"
#include <memory>
#include <optional>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/api/autofill_private/autofill_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/common/extensions/api/autofill_private.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/sync/service/sync_service.h"
#include "content/public/browser/browser_context.h"
namespace extensions {
namespace {
template <class T>
base::Value::List ToValueList(const std::vector<T>& values) { … }
}
AutofillPrivateEventRouter::AutofillPrivateEventRouter(
content::BrowserContext* context)
: … { … }
AutofillPrivateEventRouter::~AutofillPrivateEventRouter() = default;
void AutofillPrivateEventRouter::Shutdown() { … }
void AutofillPrivateEventRouter::RebindPersonalDataManagerForTesting(
autofill::PersonalDataManager* personal_data) { … }
void AutofillPrivateEventRouter::UnbindPersonalDataManagerForTesting() { … }
void AutofillPrivateEventRouter::OnPersonalDataChanged() { … }
void AutofillPrivateEventRouter::OnStateChanged(syncer::SyncService*) { … }
void AutofillPrivateEventRouter::BroadcastCurrentData() { … }
}