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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_api.cc

Issue 400843002: Clean up Bluetooth API implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a trailing return Created 6 years, 5 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: chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
index 8905b419cd63755cb63611093838b451ac36fd72..e1610e0a25de875077b5743b191e89c6836f4e67 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api.cc
@@ -101,18 +101,17 @@ namespace api {
BluetoothGetAdapterStateFunction::~BluetoothGetAdapterStateFunction() {}
-bool BluetoothGetAdapterStateFunction::DoWork(
+void BluetoothGetAdapterStateFunction::DoWork(
scoped_refptr<BluetoothAdapter> adapter) {
bluetooth::AdapterState state;
PopulateAdapterState(*adapter.get(), &state);
results_ = bluetooth::GetAdapterState::Results::Create(state);
SendResponse(true);
- return true;
}
BluetoothGetDevicesFunction::~BluetoothGetDevicesFunction() {}
-bool BluetoothGetDevicesFunction::DoWork(
+void BluetoothGetDevicesFunction::DoWork(
scoped_refptr<BluetoothAdapter> adapter) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
@@ -133,13 +132,11 @@ bool BluetoothGetDevicesFunction::DoWork(
}
SendResponse(true);
-
- return true;
}
BluetoothGetDeviceFunction::~BluetoothGetDeviceFunction() {}
-bool BluetoothGetDeviceFunction::DoWork(
+void BluetoothGetDeviceFunction::DoWork(
scoped_refptr<BluetoothAdapter> adapter) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
@@ -156,8 +153,6 @@ bool BluetoothGetDeviceFunction::DoWork(
SetError(kInvalidDevice);
SendResponse(false);
}
-
- return false;
}
void BluetoothStartDiscoveryFunction::OnSuccessCallback() {
@@ -169,15 +164,13 @@ void BluetoothStartDiscoveryFunction::OnErrorCallback() {
SendResponse(false);
}
-bool BluetoothStartDiscoveryFunction::DoWork(
+void BluetoothStartDiscoveryFunction::DoWork(
scoped_refptr<BluetoothAdapter> adapter) {
GetEventRouter(browser_context())->StartDiscoverySession(
adapter,
extension_id(),
base::Bind(&BluetoothStartDiscoveryFunction::OnSuccessCallback, this),
base::Bind(&BluetoothStartDiscoveryFunction::OnErrorCallback, this));
-
- return true;
}
void BluetoothStopDiscoveryFunction::OnSuccessCallback() {
@@ -189,15 +182,13 @@ void BluetoothStopDiscoveryFunction::OnErrorCallback() {
SendResponse(false);
}
-bool BluetoothStopDiscoveryFunction::DoWork(
+void BluetoothStopDiscoveryFunction::DoWork(
scoped_refptr<BluetoothAdapter> adapter) {
GetEventRouter(browser_context())->StopDiscoverySession(
adapter,
extension_id(),
base::Bind(&BluetoothStopDiscoveryFunction::OnSuccessCallback, this),
base::Bind(&BluetoothStopDiscoveryFunction::OnErrorCallback, this));
-
- return true;
}
} // namespace api

Powered by Google App Engine
This is Rietveld 408576698