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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc

Issue 10837294: Add bluetooth.getName API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 8 years, 4 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/chromeos/bluetooth/bluetooth_adapter.cc
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
index 82b773f335d60d377a1597271eedcd794c4c5358..005528ec1069d36e520055b9b07ba0675633b520 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
@@ -216,6 +216,7 @@ void BluetoothAdapter::ChangeAdapter(const dbus::ObjectPath& adapter_path) {
GetProperties(object_path_);
address_ = properties->address.value();
+ name_ = properties->name.value();
PoweredChanged(properties->powered.value());
DiscoveringChanged(properties->discovering.value());
@@ -236,6 +237,7 @@ void BluetoothAdapter::RemoveAdapter() {
object_path_ = dbus::ObjectPath("");
address_.clear();
+ name_.clear();
FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
AdapterPresentChanged(this, false));
@@ -335,6 +337,9 @@ void BluetoothAdapter::AdapterPropertyChanged(
} else if (property_name == properties->address.name()) {
address_ = properties->address.value();
+ } else if (property_name == properties->name.name()) {
+ name_ = properties->name.value();
+
}
}
« no previous file with comments | « chrome/browser/chromeos/bluetooth/bluetooth_adapter.h ('k') | chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698