1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
From: PF4Public@users.noreply.github.com
License: BSD
Subject: Fix building with use_bluez=false
This is a quick and dirty fix for building chromium with use_bluez=false
It prevents initialization and usage of Bluetooth by the browser
It is not supposed to be applied for use_bluez=true
WebAuthn is prevented from using Bluetooth, but it might still work with USB
see also https://github.com/PF4Public/gentoo-overlay/issues/254
---
--- a/chrome/browser/chrome_browser_main_linux.cc
+++ b/chrome/browser/chrome_browser_main_linux.cc
@@ -66,9 +66,9 @@
#if !BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(USE_DBUS)
- bluez::BluezDBusManager::Initialize(
- dbus_thread_linux::GetSharedSystemBus().get());
- session_end_listener_ = SessionEndListenerLinux::Create();
+// bluez::BluezDBusManager::Initialize(
+// dbus_thread_linux::GetSharedSystemBus().get());
+// session_end_listener_ = SessionEndListenerLinux::Create();
#endif // BUILDFLAG(USE_DBUS)
#endif // !BUILDFLAG(IS_CHROMEOS)
@@ -113,9 +113,9 @@
// No-op; per PostBrowserStart() comment, this is done elsewhere.
#else
#if BUILDFLAG(USE_DBUS)
- session_end_listener_.reset();
+// session_end_listener_.reset();
#endif
- bluez::BluezDBusManager::Shutdown();
+// bluez::BluezDBusManager::Shutdown();
#endif // BUILDFLAG(IS_CHROMEOS)
ChromeBrowserMainPartsPosix::PostDestroyThreads();
--- a/chrome/browser/metrics/bluetooth_metrics_provider.cc
+++ b/chrome/browser/metrics/bluetooth_metrics_provider.cc
@@ -16,9 +16,7 @@ BluetoothMetricsProvider::~BluetoothMetr
bool BluetoothMetricsProvider::ProvideHistograms() {
base::UmaHistogramEnumeration("Bluetooth.StackName",
- floss::features::IsFlossEnabled()
- ? BluetoothStackName::kFloss
- : BluetoothStackName::kBlueZ);
+ BluetoothStackName::kBlueZ);
return true;
}
--- a/device/bluetooth/bluetooth_adapter_factory.cc
+++ b/device/bluetooth/bluetooth_adapter_factory.cc
@@ -48,6 +48,7 @@ static constexpr bool kBluetoothSupporte
bool BluetoothAdapterFactory::IsBluetoothSupported() {
// SetAdapterForTesting() may be used to provide a test or mock adapter
// instance even on platforms that would otherwise not support it.
+ return false;
if (Get()->adapter_) {
return true;
}
@@ -55,6 +56,7 @@ bool BluetoothAdapterFactory::IsBluetoot
}
bool BluetoothAdapterFactory::IsLowEnergySupported() {
+ return false;
if (override_values_) {
return override_values_->GetLESupported();
}
|