Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: extensions/browser/api/bluetooth/bluetooth_private_api.cc

Issue 1412493002: Bluetooth extension api fixes for WebUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_543294_bluetooth_idl
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/bluetooth/bluetooth_private_api.cc
diff --git a/extensions/browser/api/bluetooth/bluetooth_private_api.cc b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
index aa63f2a7be08fca35807a11b49683fe756c74b34..43fca8ca2ccc2897b7873eee8c415ed8204a1a6a 100644
--- a/extensions/browser/api/bluetooth/bluetooth_private_api.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
@@ -252,7 +252,7 @@ bool BluetoothPrivateSetPairingResponseFunction::DoWork(
BluetoothEventRouter* router =
BluetoothAPI::Get(browser_context())->event_router();
- if (!router->GetPairingDelegate(extension_id())) {
+ if (!router->GetPairingDelegate(GetExtensionId())) {
SetError(kPairingNotEnabled);
SendResponse(false);
return true;
@@ -407,8 +407,10 @@ bool BluetoothPrivateSetDiscoveryFilterFunction::DoWork(
discovery_filter->SetPathloss(*df_param.pathloss);
}
- BluetoothAPI::Get(browser_context())->event_router()->SetDiscoveryFilter(
- discovery_filter.Pass(), adapter.get(), extension_id(),
+ BluetoothAPI::Get(browser_context())
+ ->event_router()
+ ->SetDiscoveryFilter(
+ discovery_filter.Pass(), adapter.get(), GetExtensionId(),
base::Bind(
&BluetoothPrivateSetDiscoveryFilterFunction::OnSuccessCallback,
this),
@@ -446,14 +448,14 @@ bool BluetoothPrivatePairFunction::DoWork(
BluetoothEventRouter* router =
BluetoothAPI::Get(browser_context())->event_router();
- if (!router->GetPairingDelegate(extension_id())) {
+ if (!router->GetPairingDelegate(GetExtensionId())) {
SetError(kPairingNotEnabled);
SendResponse(false);
return true;
}
device->Pair(
- router->GetPairingDelegate(extension_id()),
+ router->GetPairingDelegate(GetExtensionId()),
base::Bind(&BluetoothPrivatePairFunction::OnSuccessCallback, this),
base::Bind(&BluetoothPrivatePairFunction::OnErrorCallback, this));
return true;

Powered by Google App Engine
This is Rietveld 408576698