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

Unified Diff: device/bluetooth/bluetooth_device_win.cc

Issue 13416005: Bluetooth: clean up BluetoothDevice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make GetServices return a copy of the list Created 7 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_win.cc
diff --git a/device/bluetooth/bluetooth_device_win.cc b/device/bluetooth/bluetooth_device_win.cc
index c06693f9222c82524055e3063cd77e8560f819aa..35c1082ed0a07e989cdcfe83e0a9ee5633f4c4e0 100644
--- a/device/bluetooth/bluetooth_device_win.cc
+++ b/device/bluetooth/bluetooth_device_win.cc
@@ -31,7 +31,7 @@ BluetoothDeviceWin::BluetoothDeviceWin(
address_ = state.address;
bluetooth_class_ = state.bluetooth_class;
connected_ = state.connected;
- bonded_ = state.authenticated;
+ paired_ = state.authenticated;
for (ScopedVector<BluetoothTaskManagerWin::ServiceRecordState>::const_iterator
iter = state.service_record_states.begin();
@@ -54,15 +54,35 @@ BluetoothDeviceWin::BluetoothDeviceWin(
BluetoothDeviceWin::~BluetoothDeviceWin() {
}
-void BluetoothDeviceWin::SetVisible(bool visible) {
- visible_ = visible;
+uint32 BluetoothDeviceWin::bluetooth_class() const {
+ return bluetooth_class_;
+}
+
+std::string BluetoothDeviceWin::name() const {
+ return name_;
+}
+
+std::string BluetoothDeviceWin::address() const {
+ return address_;
}
bool BluetoothDeviceWin::IsPaired() const {
+ return paired_;
+}
+
+bool BluetoothDeviceWin::IsConnected() const {
+ return connected_;
+}
+
+bool BluetoothDeviceWin::IsConnectable() const {
+ return false;
+}
+
+bool BluetoothDeviceWin::IsConnecting() const {
return false;
}
-const BluetoothDevice::ServiceList& BluetoothDeviceWin::GetServices() const {
+BluetoothDevice::ServiceList BluetoothDeviceWin::GetServices() const {
return service_uuids_;
}
@@ -176,7 +196,6 @@ uint32 BluetoothDeviceWin::ComputeDeviceFingerprint(
state.name.c_str(),
state.address.c_str(),
state.bluetooth_class,
- state.visible ? "true" : "false",
state.connected ? "true" : "false",
state.authenticated ? "true" : "false");
for (ScopedVector<BluetoothTaskManagerWin::ServiceRecordState>::const_iterator

Powered by Google App Engine
This is Rietveld 408576698