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

Unified Diff: device/bluetooth/bluetooth_pairing_chromeos.cc

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_pairing_chromeos.cc
diff --git a/device/bluetooth/bluetooth_pairing_chromeos.cc b/device/bluetooth/bluetooth_pairing_chromeos.cc
index dc73f6d7f6c6e408833fbf00be80c7481ee19631..c69bc94ba94171227ab9979e71d7f982e97c7551 100644
--- a/device/bluetooth/bluetooth_pairing_chromeos.cc
+++ b/device/bluetooth/bluetooth_pairing_chromeos.cc
@@ -56,24 +56,25 @@ BluetoothPairingChromeOS::~BluetoothPairingChromeOS() {
if (!pincode_callback_.is_null()) {
pincode_callback_.Run(
- BluetoothAgentServiceProvider::Delegate::CANCELLED, "");
+ bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED, "");
}
if (!passkey_callback_.is_null()) {
passkey_callback_.Run(
- BluetoothAgentServiceProvider::Delegate::CANCELLED, 0);
+ bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED, 0);
}
if (!confirmation_callback_.is_null()) {
confirmation_callback_.Run(
- BluetoothAgentServiceProvider::Delegate::CANCELLED);
+ bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED);
}
pairing_delegate_ = NULL;
}
void BluetoothPairingChromeOS::RequestPinCode(
- const BluetoothAgentServiceProvider::Delegate::PinCodeCallback& callback) {
+ const bluez::BluetoothAgentServiceProvider::Delegate::PinCodeCallback&
+ callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
UMA_PAIRING_METHOD_REQUEST_PINCODE,
UMA_PAIRING_METHOD_COUNT);
@@ -92,7 +93,7 @@ void BluetoothPairingChromeOS::SetPinCode(const std::string& pincode) {
if (pincode_callback_.is_null())
return;
- pincode_callback_.Run(BluetoothAgentServiceProvider::Delegate::SUCCESS,
+ pincode_callback_.Run(bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS,
pincode);
pincode_callback_.Reset();
@@ -120,7 +121,8 @@ void BluetoothPairingChromeOS::DisplayPinCode(const std::string& pincode) {
}
void BluetoothPairingChromeOS::RequestPasskey(
- const BluetoothAgentServiceProvider::Delegate::PasskeyCallback& callback) {
+ const bluez::BluetoothAgentServiceProvider::Delegate::PasskeyCallback&
+ callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
UMA_PAIRING_METHOD_REQUEST_PASSKEY,
UMA_PAIRING_METHOD_COUNT);
@@ -139,7 +141,7 @@ void BluetoothPairingChromeOS::SetPasskey(uint32 passkey) {
if (passkey_callback_.is_null())
return;
- passkey_callback_.Run(BluetoothAgentServiceProvider::Delegate::SUCCESS,
+ passkey_callback_.Run(bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS,
passkey);
passkey_callback_.Reset();
@@ -174,7 +176,7 @@ void BluetoothPairingChromeOS::KeysEntered(uint16 entered) {
void BluetoothPairingChromeOS::RequestConfirmation(
uint32 passkey,
- const BluetoothAgentServiceProvider::Delegate::ConfirmationCallback&
+ const bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback&
callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
UMA_PAIRING_METHOD_CONFIRM_PASSKEY,
@@ -187,7 +189,7 @@ void BluetoothPairingChromeOS::RequestConfirmation(
}
void BluetoothPairingChromeOS::RequestAuthorization(
- const BluetoothAgentServiceProvider::Delegate::ConfirmationCallback&
+ const bluez::BluetoothAgentServiceProvider::Delegate::ConfirmationCallback&
callback) {
UMA_HISTOGRAM_ENUMERATION("Bluetooth.PairingMethod",
UMA_PAIRING_METHOD_NONE,
@@ -207,7 +209,8 @@ void BluetoothPairingChromeOS::ConfirmPairing() {
if (confirmation_callback_.is_null())
return;
- confirmation_callback_.Run(BluetoothAgentServiceProvider::Delegate::SUCCESS);
+ confirmation_callback_.Run(
+ bluez::BluetoothAgentServiceProvider::Delegate::SUCCESS);
confirmation_callback_.Reset();
// If this is not an outgoing connection to the device, clean up the pairing
@@ -219,12 +222,12 @@ void BluetoothPairingChromeOS::ConfirmPairing() {
bool BluetoothPairingChromeOS::RejectPairing() {
return RunPairingCallbacks(
- BluetoothAgentServiceProvider::Delegate::REJECTED);
+ bluez::BluetoothAgentServiceProvider::Delegate::REJECTED);
}
bool BluetoothPairingChromeOS::CancelPairing() {
return RunPairingCallbacks(
- BluetoothAgentServiceProvider::Delegate::CANCELLED);
+ bluez::BluetoothAgentServiceProvider::Delegate::CANCELLED);
}
BluetoothDevice::PairingDelegate*
@@ -239,7 +242,7 @@ void BluetoothPairingChromeOS::ResetCallbacks() {
}
bool BluetoothPairingChromeOS::RunPairingCallbacks(
- BluetoothAgentServiceProvider::Delegate::Status status) {
+ bluez::BluetoothAgentServiceProvider::Delegate::Status status) {
pairing_delegate_used_ = true;
bool callback_run = false;
« no previous file with comments | « device/bluetooth/bluetooth_pairing_chromeos.h ('k') | device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698