#include "chrome/browser/extensions/error_console/error_console.h"
#include <optional>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/lazy_instance.h"
#include "base/observer_list.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/error_console/error_console_factory.h"
#include "chrome/common/pref_names.h"
#include "components/crx_file/id_util.h"
#include "components/prefs/pref_service.h"
#include "components/version_info/version_info.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/feature_switch.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/logging_constants.h"
namespace extensions {
namespace {
const char kStoreExtensionErrorsPref[] = …;
const int kDefaultMask = …;
const char kAppsDeveloperToolsExtensionId[] = …;
}
void ErrorConsole::Observer::OnErrorAdded(const ExtensionError* error) { … }
void ErrorConsole::Observer::OnErrorsRemoved(
const std::set<std::string>& extension_ids) { … }
void ErrorConsole::Observer::OnErrorConsoleDestroyed() { … }
ErrorConsole::ErrorConsole(Profile* profile)
: … { … }
ErrorConsole::~ErrorConsole() { … }
ErrorConsole* ErrorConsole::Get(content::BrowserContext* browser_context) { … }
void ErrorConsole::SetReportingForExtension(const std::string& extension_id,
ExtensionError::Type type,
bool enabled) { … }
void ErrorConsole::SetReportingAllForExtension(
const std::string& extension_id, bool enabled) { … }
bool ErrorConsole::IsReportingEnabledForExtension(
const std::string& extension_id) const { … }
void ErrorConsole::UseDefaultReportingForExtension(
const std::string& extension_id) { … }
void ErrorConsole::ReportError(std::unique_ptr<ExtensionError> error) { … }
void ErrorConsole::RemoveErrors(const ErrorMap::Filter& filter) { … }
const ErrorList& ErrorConsole::GetErrorsForExtension(
const std::string& extension_id) const { … }
void ErrorConsole::AddObserver(Observer* observer) { … }
void ErrorConsole::RemoveObserver(Observer* observer) { … }
bool ErrorConsole::IsEnabledForChromeExtensionsPage() const { … }
bool ErrorConsole::IsEnabledForAppsDeveloperTools() const { … }
void ErrorConsole::CheckEnabled() { … }
void ErrorConsole::Enable() { … }
void ErrorConsole::Disable() { … }
void ErrorConsole::OnPrefChanged() { … }
void ErrorConsole::OnExtensionUnloaded(content::BrowserContext* browser_context,
const Extension* extension,
UnloadedExtensionReason reason) { … }
void ErrorConsole::OnExtensionLoaded(content::BrowserContext* browser_context,
const Extension* extension) { … }
void ErrorConsole::OnExtensionInstalled(
content::BrowserContext* browser_context,
const Extension* extension,
bool is_update) { … }
void ErrorConsole::OnExtensionUninstalled(
content::BrowserContext* browser_context,
const Extension* extension,
extensions::UninstallReason reason) { … }
void ErrorConsole::AddManifestErrorsForExtension(const Extension* extension) { … }
void ErrorConsole::OnOffTheRecordProfileCreated(Profile* off_the_record) { … }
void ErrorConsole::OnProfileWillBeDestroyed(Profile* profile) { … }
int ErrorConsole::GetMaskForExtension(const std::string& extension_id) const { … }
}