#include "chrome/browser/ui/extensions/extension_settings_overridden_dialog.h"
#include <set>
#include <utility>
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "base/supports_user_data.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/extensions/extensions_overrides/simple_overrides.h"
#include "chrome/browser/ui/ui_features.h"
#include "extensions/browser/disable_reason.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/management_policy.h"
#include "extensions/common/extension.h"
namespace {
ExtensionId;
constexpr char kShownExtensionDataKey[] = …;
struct ShownExtensionSet : public base::SupportsUserData::Data { … };
ShownExtensionSet* GetShownExtensionSet(Profile* profile,
bool create_if_missing) { … }
bool HasShownFor(Profile* profile, const ExtensionId& id) { … }
void MarkShownFor(Profile* profile, const ExtensionId& id) { … }
}
ExtensionSettingsOverriddenDialog::Params::Params(
extensions::ExtensionId controlling_extension_id,
const char* extension_acknowledged_preference_name,
const char* dialog_result_histogram_name,
std::u16string dialog_title,
std::u16string dialog_message,
const gfx::VectorIcon* icon)
: … { … }
ExtensionSettingsOverriddenDialog::Params::~Params() = default;
ExtensionSettingsOverriddenDialog::Params::Params(Params&& params) = default;
ExtensionSettingsOverriddenDialog::ExtensionSettingsOverriddenDialog(
Params params,
Profile* profile)
: … { … }
ExtensionSettingsOverriddenDialog::~ExtensionSettingsOverriddenDialog() =
default;
bool ExtensionSettingsOverriddenDialog::ShouldShow() { … }
SettingsOverriddenDialogController::ShowParams
ExtensionSettingsOverriddenDialog::GetShowParams() { … }
void ExtensionSettingsOverriddenDialog::OnDialogShown() { … }
void ExtensionSettingsOverriddenDialog::HandleDialogResult(
DialogResult result) { … }
void ExtensionSettingsOverriddenDialog::DisableControllingExtension() { … }
void ExtensionSettingsOverriddenDialog::AcknowledgeControllingExtension() { … }
bool ExtensionSettingsOverriddenDialog::HasAcknowledgedExtension(
const ExtensionId& id) { … }