#include "extensions/common/api/bluetooth/bluetooth_manifest_permission.h"
#include <memory>
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "device/bluetooth/public/cpp/bluetooth_uuid.h"
#include "extensions/common/api/bluetooth/bluetooth_manifest_data.h"
#include "extensions/common/api/extensions_manifest_types.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/features/behavior_feature.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/strings/grit/extensions_strings.h"
#include "ipc/ipc_message.h"
#include "ui/base/l10n/l10n_util.h"
namespace extensions {
namespace bluetooth_errors {
const char kErrorInvalidUuid[] = …;
}
namespace {
bool ParseUuid(BluetoothManifestPermission* permission,
const std::string& uuid,
std::u16string* error) { … }
bool ParseUuidArray(BluetoothManifestPermission* permission,
const std::vector<std::string>& uuids,
std::u16string* error) { … }
}
BluetoothManifestPermission::BluetoothManifestPermission()
: … { … }
BluetoothManifestPermission::~BluetoothManifestPermission() = default;
std::unique_ptr<BluetoothManifestPermission>
BluetoothManifestPermission::FromValue(const base::Value& value,
std::u16string* error) { … }
bool BluetoothManifestPermission::CheckRequest(
const Extension* extension,
const BluetoothPermissionRequest& request) const { … }
bool BluetoothManifestPermission::CheckSocketPermitted(
const Extension* extension) const { … }
bool BluetoothManifestPermission::CheckLowEnergyPermitted(
const Extension* extension) const { … }
bool BluetoothManifestPermission::CheckPeripheralPermitted(
const Extension* extension) const { … }
std::string BluetoothManifestPermission::name() const { … }
std::string BluetoothManifestPermission::id() const { … }
PermissionIDSet BluetoothManifestPermission::GetPermissions() const { … }
bool BluetoothManifestPermission::FromValue(const base::Value* value) { … }
std::unique_ptr<base::Value> BluetoothManifestPermission::ToValue() const { … }
std::unique_ptr<ManifestPermission> BluetoothManifestPermission::Diff(
const ManifestPermission* rhs) const { … }
std::unique_ptr<ManifestPermission> BluetoothManifestPermission::Union(
const ManifestPermission* rhs) const { … }
std::unique_ptr<ManifestPermission> BluetoothManifestPermission::Intersect(
const ManifestPermission* rhs) const { … }
void BluetoothManifestPermission::AddPermission(const std::string& uuid) { … }
bool BluetoothManifestPermission::RequiresManagementUIWarning() const { … }
}