#include "chrome/browser/extensions/extension_error_ui_default.h"
#include "base/check.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/global_error/global_error_bubble_view_base.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/strings/grit/components_strings.h"
#include "extensions/browser/blocklist_extension_prefs.h"
#include "extensions/browser/disable_reason.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/management_policy.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "ui/base/l10n/l10n_util.h"
namespace extensions {
namespace {
std::u16string GenerateTitle(const ExtensionSet& forbidden,
bool item_blocked_by_policy_exists,
int extension_count,
int app_count) { … }
std::vector<std::u16string> GenerateEnterpriseMessage(
const ExtensionSet& forbidden) { … }
std::vector<std::u16string> GenerateMessage(
const ExtensionSet& forbidden,
bool item_blocked_by_policy_exists) { … }
}
class ExtensionGlobalError : public GlobalErrorWithStandardBubble { … };
ExtensionErrorUIDefault::ExtensionErrorUIDefault(
ExtensionErrorUI::Delegate* delegate)
: … { … }
ExtensionErrorUIDefault::~ExtensionErrorUIDefault() = default;
bool ExtensionErrorUIDefault::ShowErrorInBubbleView() { … }
void ExtensionErrorUIDefault::ShowExtensions() { … }
void ExtensionErrorUIDefault::Close() { … }
GlobalErrorWithStandardBubble* ExtensionErrorUIDefault::GetErrorForTesting() { … }
void ExtensionErrorUIDefault::SetManagementPolicyForTesting(
ManagementPolicy* management_policy) { … }
}