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

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

Issue 9378039: dbus: add ObjectPath type (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: add patch for cryptohome_client Created 8 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/bluetooth/bluetooth_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2679274474d51ef75bad2f020a0433cb3e7eaa42..65c53f55df72464adb31ad04ec7bb6a373a0ae5d 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
@@ -49,40 +49,40 @@ class BluetoothAdapterImpl : public BluetoothAdapter,
virtual void StartDiscovery() {
VLOG(1) << id_ << ": StartDiscovery";
DCHECK(bluetooth_adapter_client_);
- bluetooth_adapter_client_->StartDiscovery(id_);
+ bluetooth_adapter_client_->StartDiscovery(dbus::ObjectPath(id_));
}
virtual void StopDiscovery() {
VLOG(1) << id_ << ": StopDiscovery";
DCHECK(bluetooth_adapter_client_);
- bluetooth_adapter_client_->StopDiscovery(id_);
+ bluetooth_adapter_client_->StopDiscovery(dbus::ObjectPath(id_));
}
// BluetoothAdapterClient::Observer override.
- virtual void DiscoveringPropertyChanged(const std::string& object_path,
+ virtual void DiscoveringPropertyChanged(const dbus::ObjectPath& object_path,
bool discovering) {
- VLOG(1) << id_ << ": object_path = " << object_path << ", Discovering = "
- << discovering;
- if (object_path != id_) {
+ VLOG(1) << id_ << ": object_path = " << object_path.value()
+ << ", Discovering = " << discovering;
+ if (object_path.value() != id_) {
return;
}
if (discovering) {
FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- DiscoveryStarted(object_path));
+ DiscoveryStarted(object_path.value()));
} else {
FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- DiscoveryEnded(object_path));
+ DiscoveryEnded(object_path.value()));
}
}
// BluetoothAdapterClient::Observer override.
- virtual void DeviceFound(const std::string& object_path,
+ virtual void DeviceFound(const dbus::ObjectPath& object_path,
const std::string& address,
const base::DictionaryValue& device_properties) {
- VLOG(1) << id_ << ": object_path = " << object_path << ", Device found: "
- << address << " (with " << device_properties.size()
- << " properties)";
- if (object_path != id_) {
+ VLOG(1) << id_ << ": object_path = " << object_path.value()
+ << ", Device found: " << address << " (with "
+ << device_properties.size() << " properties)";
+ if (object_path.value() != id_) {
return;
}
// TODO(vlaviano): later, we will want to persist the device.
@@ -90,18 +90,18 @@ class BluetoothAdapterImpl : public BluetoothAdapter,
BluetoothDevice::Create(device_properties));
if (device.get() != NULL) {
FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- DeviceFound(object_path, device.get()));
+ DeviceFound(object_path.value(), device.get()));
} else {
LOG(WARNING) << "Could not create BluetoothDevice from properties.";
}
}
// BluetoothAdapterClient::Observer override.
- virtual void DeviceDisappeared(const std::string& object_path,
+ virtual void DeviceDisappeared(const dbus::ObjectPath& object_path,
const std::string& address) {
- VLOG(1) << id_ << ": object_path = " << object_path
+ VLOG(1) << id_ << ": object_path = " << object_path.value()
<< ", Device disappeared: " << address;
- if (object_path != id_) {
+ if (object_path.value() != id_) {
return;
}
// For now, we don't propagate this event to our observers.
« no previous file with comments | « no previous file | chrome/browser/chromeos/bluetooth/bluetooth_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698