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

Unified Diff: device/bluetooth/bluetooth_device_chromeos.cc

Issue 180163009: chrome.bluetooth API improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix threading ownership related to ApiResourceManager<BluetoothApiSocket> and BluetoothSocketEventD… Created 6 years, 9 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: device/bluetooth/bluetooth_device_chromeos.cc
diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc
index aa1d66b1859e744bde5eec6a7e369a3a66d8064b..ffdba6102fdd11784ba3d2ee1e40de32fd885890 100644
--- a/device/bluetooth/bluetooth_device_chromeos.cc
+++ b/device/bluetooth/bluetooth_device_chromeos.cc
@@ -25,6 +25,8 @@ using device::BluetoothDevice;
namespace {
+const char kNotImplemented[] = "Function not yet implemented";
+
// Histogram enumerations for pairing results.
enum UMAPairingResult {
UMA_PAIRING_RESULT_SUCCESS,
@@ -227,7 +229,7 @@ void BluetoothDeviceChromeOS::GetServiceRecords(
const ServiceRecordsCallback& callback,
const ErrorCallback& error_callback) {
// TODO(keybuk): not implemented; remove
- error_callback.Run();
+ error_callback.Run(kNotImplemented);
}
void BluetoothDeviceChromeOS::ProvidesServiceWithName(
@@ -367,6 +369,10 @@ void BluetoothDeviceChromeOS::ConnectToService(
void BluetoothDeviceChromeOS::ConnectToProfile(
device::BluetoothProfile* profile,
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
+ scoped_refptr<base::SequencedTaskRunner> file_task_runner,
+ net::NetLog* net_log,
+ const net::NetLog::Source& source,
const base::Closure& callback,
const ErrorCallback& error_callback) {
BluetoothProfileChromeOS* profile_chromeos =
@@ -394,14 +400,14 @@ void BluetoothDeviceChromeOS::SetOutOfBandPairingData(
const base::Closure& callback,
const ErrorCallback& error_callback) {
// TODO(keybuk): implement
- error_callback.Run();
+ error_callback.Run(kNotImplemented);
}
void BluetoothDeviceChromeOS::ClearOutOfBandPairingData(
const base::Closure& callback,
const ErrorCallback& error_callback) {
// TODO(keybuk): implement
- error_callback.Run();
+ error_callback.Run(kNotImplemented);
}
BluetoothPairingChromeOS* BluetoothDeviceChromeOS::BeginPairing(
@@ -564,7 +570,7 @@ void BluetoothDeviceChromeOS::OnDisconnectError(
const std::string& error_message) {
LOG(WARNING) << object_path_.value() << ": Failed to disconnect device: "
<< error_name << ": " << error_message;
- error_callback.Run();
+ error_callback.Run(error_message);
}
void BluetoothDeviceChromeOS::OnForgetError(
@@ -573,7 +579,7 @@ void BluetoothDeviceChromeOS::OnForgetError(
const std::string& error_message) {
LOG(WARNING) << object_path_.value() << ": Failed to remove device: "
<< error_name << ": " << error_message;
- error_callback.Run();
+ error_callback.Run(error_message);
}
void BluetoothDeviceChromeOS::OnConnectProfile(
@@ -596,7 +602,7 @@ void BluetoothDeviceChromeOS::OnConnectProfileError(
VLOG(1) << object_path_.value() << ": Profile connection failed: "
<< profile_chromeos->uuid() << ": "
<< error_name << ": " << error_message;
- error_callback.Run();
+ error_callback.Run(error_message);
}
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698