#include "content/browser/bluetooth/bluetooth_blocklist.h"
#include <string_view>
#include "base/check.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_split.h"
#include "content/browser/bluetooth/bluetooth_util.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
#include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
BluetoothUUID;
ManufacturerId;
namespace {
static base::LazyInstance<content::BluetoothBlocklist>::Leaky g_singleton = …;
}
namespace content {
BluetoothBlocklist::~BluetoothBlocklist() { … }
BluetoothBlocklist& BluetoothBlocklist::Get() { … }
void BluetoothBlocklist::Add(const BluetoothUUID& uuid, Value value) { … }
void BluetoothBlocklist::Add(std::string_view blocklist_string) { … }
void BluetoothBlocklist::Add(
const device::BluetoothDevice::ManufacturerId& company_identifier,
const std::vector<blink::mojom::WebBluetoothDataFilter>& prefix) { … }
bool BluetoothBlocklist::IsExcluded(const BluetoothUUID& uuid) const { … }
bool BluetoothBlocklist::IsExcluded(
const blink::mojom::WebBluetoothCompanyPtr& company_identifier,
const std::vector<blink::mojom::WebBluetoothDataFilterPtr>& filter_data)
const { … }
bool BluetoothBlocklist::IsExcluded(
const device::BluetoothDevice::ManufacturerId& company_identifier,
const device::BluetoothDevice::ManufacturerData& manufacturer_data) const { … }
bool BluetoothBlocklist::IsExcluded(
const std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>& filters) { … }
bool BluetoothBlocklist::IsExcludedFromReads(const BluetoothUUID& uuid) const { … }
bool BluetoothBlocklist::IsExcludedFromWrites(const BluetoothUUID& uuid) const { … }
void BluetoothBlocklist::RemoveExcludedUUIDs(
blink::mojom::WebBluetoothRequestDeviceOptions* options) { … }
void BluetoothBlocklist::ResetToDefaultValuesForTest() { … }
BluetoothBlocklist::BluetoothBlocklist() { … }
void BluetoothBlocklist::PopulateWithDefaultValues() { … }
void BluetoothBlocklist::PopulateWithServerProvidedValues() { … }
}