#include "extensions/browser/events/lazy_event_dispatch_util.h"
#include <optional>
#include "base/observer_list.h"
#include "base/version.h"
#include "content/public/browser/browser_context.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_prefs.h"
namespace extensions {
namespace {
const char kPrefPreviousVersion[] = …;
const char kPrefPendingOnInstalledEventDispatchInfo[] = …;
}
LazyEventDispatchUtil::LazyEventDispatchUtil(
content::BrowserContext* browser_context)
: … { … }
LazyEventDispatchUtil::~LazyEventDispatchUtil() = default;
void LazyEventDispatchUtil::AddObserver(Observer* observer) { … }
void LazyEventDispatchUtil::RemoveObserver(Observer* observer) { … }
void LazyEventDispatchUtil::OnExtensionLoaded(
content::BrowserContext* browser_context,
const Extension* extension) { … }
void LazyEventDispatchUtil::OnExtensionUninstalled(
content::BrowserContext* browser_context,
const Extension* extension,
UninstallReason reason) { … }
void LazyEventDispatchUtil::OnExtensionWillBeInstalled(
content::BrowserContext* browser_context,
const Extension* extension,
bool is_update,
const std::string& old_name) { … }
bool LazyEventDispatchUtil::ReadPendingOnInstallInfoFromPref(
const ExtensionId& extension_id,
base::Version* previous_version) { … }
void LazyEventDispatchUtil::RemovePendingOnInstallInfoFromPref(
const ExtensionId& extension_id) { … }
void LazyEventDispatchUtil::StorePendingOnInstallInfoToPref(
const Extension* extension) { … }
}