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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_private_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_private_api.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_private_api.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_private_api.cc
index 861197df9b3a59e9056dbd62150b2134978865fe..dab0911c94b9fc97b66c662df6d40965e0faea87 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_private_api.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_private_api.cc
@@ -120,7 +120,7 @@ BluetoothPrivateSetAdapterStateFunction::
BluetoothPrivateSetAdapterStateFunction::
~BluetoothPrivateSetAdapterStateFunction() {}
-bool BluetoothPrivateSetAdapterStateFunction::DoWork(
+void BluetoothPrivateSetAdapterStateFunction::DoWork(
scoped_refptr<device::BluetoothAdapter> adapter) {
scoped_ptr<bt_private::SetAdapterState::Params> params(
bt_private::SetAdapterState::Params::Create(*args_));
@@ -129,7 +129,7 @@ bool BluetoothPrivateSetAdapterStateFunction::DoWork(
if (!adapter->IsPresent()) {
SetError(kAdapterNotPresent);
SendResponse(false);
- return true;
+ return;
}
const bt_private::NewAdapterState& new_state = params->adapter_state;
@@ -163,7 +163,6 @@ bool BluetoothPrivateSetAdapterStateFunction::DoWork(
if (pending_properties_.empty())
SendResponse(true);
- return true;
}
base::Closure
@@ -232,7 +231,7 @@ BluetoothPrivateSetPairingResponseFunction::
BluetoothPrivateSetPairingResponseFunction::
~BluetoothPrivateSetPairingResponseFunction() {}
-bool BluetoothPrivateSetPairingResponseFunction::DoWork(
+void BluetoothPrivateSetPairingResponseFunction::DoWork(
scoped_refptr<device::BluetoothAdapter> adapter) {
scoped_ptr<bt_private::SetPairingResponse::Params> params(
bt_private::SetPairingResponse::Params::Create(*args_));
@@ -244,7 +243,7 @@ bool BluetoothPrivateSetPairingResponseFunction::DoWork(
if (!router->GetPairingDelegate(extension_id())) {
SetError(kPairingNotEnabled);
SendResponse(false);
- return true;
+ return;
}
const std::string& device_address = options.device.address;
@@ -252,13 +251,13 @@ bool BluetoothPrivateSetPairingResponseFunction::DoWork(
if (!device) {
SetError(kDeviceNotFoundError);
SendResponse(false);
- return true;
+ return;
}
if (!ValidatePairingResponseOptions(device, options)) {
SetError(kInvalidPairingResponseOptions);
SendResponse(false);
- return true;
+ return;
}
if (options.pincode.get()) {
@@ -282,7 +281,6 @@ bool BluetoothPrivateSetPairingResponseFunction::DoWork(
}
SendResponse(true);
- return true;
}
} // namespace api

Powered by Google App Engine
This is Rietveld 408576698