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

Unified Diff: chrome/browser/chromeos/dbus/bluetooth_device_client.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
Index: chrome/browser/chromeos/dbus/bluetooth_device_client.cc
diff --git a/chrome/browser/chromeos/dbus/bluetooth_device_client.cc b/chrome/browser/chromeos/dbus/bluetooth_device_client.cc
index 606968147dcddff602dc7ec58dfb4d08e17cefff..78121fcb37d916d520f6e8dab224b5bd188c5601 100644
--- a/chrome/browser/chromeos/dbus/bluetooth_device_client.cc
+++ b/chrome/browser/chromeos/dbus/bluetooth_device_client.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/chromeos/system/runtime_environment.h"
#include "dbus/bus.h"
#include "dbus/message.h"
+#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
@@ -53,23 +54,24 @@ class BluetoothDeviceClientImpl: public BluetoothDeviceClient,
private:
// BluetoothAdapterClient::Observer override.
- virtual void DeviceCreated(const std::string& adapter_path,
- const std::string& object_path) OVERRIDE {
- VLOG(1) << "DeviceCreated: " << object_path;
+ virtual void DeviceCreated(const dbus::ObjectPath& adapter_path,
+ const dbus::ObjectPath& object_path) OVERRIDE {
+ VLOG(1) << "DeviceCreated: " << object_path.value();
}
// BluetoothAdapterClient::Observer override.
- virtual void DeviceRemoved(const std::string& adapter_path,
- const std::string& object_path) OVERRIDE {
- VLOG(1) << "DeviceRemoved: " << object_path;
+ virtual void DeviceRemoved(const dbus::ObjectPath& adapter_path,
+ const dbus::ObjectPath& object_path) OVERRIDE {
+ VLOG(1) << "DeviceRemoved: " << object_path.value();
RemoveObjectProxyForPath(object_path);
}
// Ensures that we have a dbus object proxy for a device with dbus
// object path |object_path|, and if not, creates it stores it in
// our |proxy_map_| map.
- dbus::ObjectProxy* GetObjectProxyForPath(const std::string& object_path) {
- VLOG(1) << "GetObjectProxyForPath: " << object_path;
+ dbus::ObjectProxy* GetObjectProxyForPath(
+ const dbus::ObjectPath& object_path) {
+ VLOG(1) << "GetObjectProxyForPath: " << object_path.value();
ProxyMap::iterator it = proxy_map_.find(object_path);
if (it != proxy_map_.end())
@@ -86,8 +88,8 @@ class BluetoothDeviceClientImpl: public BluetoothDeviceClient,
// Removes the dbus object proxy for the device with dbus object path
// |object_path| from our |proxy_map_| map.
- void RemoveObjectProxyForPath(const std::string& object_path) {
- VLOG(1) << "RemoveObjectProxyForPath: " << object_path;
+ void RemoveObjectProxyForPath(const dbus::ObjectPath& object_path) {
+ VLOG(1) << "RemoveObjectProxyForPath: " << object_path.value();
proxy_map_.erase(object_path);
}
@@ -98,7 +100,7 @@ class BluetoothDeviceClientImpl: public BluetoothDeviceClient,
dbus::Bus* bus_;
// We maintain a collection of dbus object proxies, one for each device.
- typedef std::map<const std::string, dbus::ObjectProxy*> ProxyMap;
+ typedef std::map<const dbus::ObjectPath, dbus::ObjectProxy*> ProxyMap;
ProxyMap proxy_map_;
// List of observers interested in event notifications from us.
« no previous file with comments | « chrome/browser/chromeos/dbus/bluetooth_adapter_client.cc ('k') | chrome/browser/chromeos/dbus/bluetooth_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698