#include "chrome/common/extensions/permissions/chrome_permission_message_rules.h"
#include <initializer_list>
#include <iterator>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/feature_list.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/grit/generated_resources.h"
#include "components/device_signals/core/common/signals_features.h"
#include "extensions/common/mojom/api_permission_id.mojom.h"
#include "ui/base/l10n/l10n_util.h"
APIPermissionID;
namespace extensions {
namespace {
class DefaultPermissionMessageFormatter
: public ChromePermissionMessageFormatter { … };
class SingleParameterFormatter : public ChromePermissionMessageFormatter { … };
class SimpleListFormatter : public ChromePermissionMessageFormatter { … };
class SpaceSeparatedListFormatter : public ChromePermissionMessageFormatter { … };
class HostListFormatter : public ChromePermissionMessageFormatter { … };
class USBDevicesFormatter : public ChromePermissionMessageFormatter { … };
int GetEnterpriseReportingPrivatePermissionMessageId() { … }
}
ChromePermissionMessageRule::ChromePermissionMessageRule(
int message_id,
const std::initializer_list<APIPermissionID>& required,
const std::initializer_list<APIPermissionID>& optional)
: … { … }
ChromePermissionMessageRule::ChromePermissionMessageRule(
std::unique_ptr<ChromePermissionMessageFormatter> formatter,
const std::initializer_list<APIPermissionID>& required,
const std::initializer_list<APIPermissionID>& optional)
: … { … }
ChromePermissionMessageRule::ChromePermissionMessageRule(
ChromePermissionMessageRule&& other) = default;
ChromePermissionMessageRule& ChromePermissionMessageRule::operator=(
ChromePermissionMessageRule&& other) = default;
ChromePermissionMessageRule::~ChromePermissionMessageRule() { … }
std::set<APIPermissionID> ChromePermissionMessageRule::required_permissions()
const { … }
std::set<APIPermissionID> ChromePermissionMessageRule::optional_permissions()
const { … }
std::set<APIPermissionID> ChromePermissionMessageRule::all_permissions() const { … }
PermissionMessage ChromePermissionMessageRule::GetPermissionMessage(
const PermissionIDSet& permissions) const { … }
std::vector<ChromePermissionMessageRule>
ChromePermissionMessageRule::GetAllRules() { … }
}