#include "content/browser/bluetooth/bluetooth_allowed_devices.h"
#include <string>
#include <vector>
#include "base/containers/contains.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "content/browser/bluetooth/bluetooth_blocklist.h"
BluetoothUUID;
namespace content {
BluetoothAllowedDevices::BluetoothAllowedDevices() { … }
BluetoothAllowedDevices::BluetoothAllowedDevices(
const BluetoothAllowedDevices& other) = default;
BluetoothAllowedDevices::~BluetoothAllowedDevices() { … }
const blink::WebBluetoothDeviceId& BluetoothAllowedDevices::AddDevice(
const std::string& device_address,
const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options) { … }
const blink::WebBluetoothDeviceId& BluetoothAllowedDevices::AddDevice(
const std::string& device_address) { … }
void BluetoothAllowedDevices::RemoveDevice(const std::string& device_address) { … }
const blink::WebBluetoothDeviceId* BluetoothAllowedDevices::GetDeviceId(
const std::string& device_address) { … }
const std::string& BluetoothAllowedDevices::GetDeviceAddress(
const blink::WebBluetoothDeviceId& device_id) { … }
bool BluetoothAllowedDevices::IsAllowedToAccessAtLeastOneService(
const blink::WebBluetoothDeviceId& device_id) const { … }
bool BluetoothAllowedDevices::IsAllowedToAccessService(
const blink::WebBluetoothDeviceId& device_id,
const BluetoothUUID& service_uuid) const { … }
bool BluetoothAllowedDevices::IsAllowedToGATTConnect(
const blink::WebBluetoothDeviceId& device_id) const { … }
bool BluetoothAllowedDevices::IsAllowedToAccessManufacturerData(
const blink::WebBluetoothDeviceId& device_id,
const uint16_t manufacturer_code) const { … }
blink::WebBluetoothDeviceId BluetoothAllowedDevices::GenerateUniqueDeviceId() { … }
void BluetoothAllowedDevices::AddUnionOfServicesTo(
const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options,
std::unordered_set<BluetoothUUID, device::BluetoothUUIDHash>*
unionOfServices) { … }
void BluetoothAllowedDevices::AddManufacturerDataTo(
const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options,
base::flat_set<uint16_t>* manufacturer_codes) { … }
}