diff --git a/chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.cc b/chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.cc index 6b4dd7116c444..6ece2639937ab 100644 --- a/chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.cc +++ b/chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.cc @@ -63,17 +63,12 @@ std::unique_ptr ChromeBluetoothDelegateImplClient::ShowBluetoothScanningPrompt( content::RenderFrameHost* frame, const content::BluetoothScanningPrompt::EventHandler& event_handler) { -#if BUILDFLAG(IS_ANDROID) - return std::make_unique( - frame, event_handler, - std::make_unique( - Profile::FromBrowserContext(frame->GetBrowserContext()))); -#else - return std::make_unique( - frame, event_handler, - CreateChooserTitle(frame, IDS_BLUETOOTH_SCANNING_PROMPT), - base::BindOnce(chrome::ShowDeviceChooserDialog, frame)); -#endif + // POC INSTRUMENTATION: simulate the user clicking "Allow" on the + // Bluetooth scanning permission prompt. This is the only modification + // to Chromium and is purely a UI-automation shim; the vulnerable code + // path (ScanningClient::SendEvent) is unmodified. + event_handler.Run(content::BluetoothScanningPrompt::Event::kAllow); + return nullptr; } void ChromeBluetoothDelegateImplClient::ShowBluetoothDevicePairDialog(