diff options
author | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 20:08:06 +0000 |
---|---|---|
committer | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-14 20:08:06 +0000 |
commit | bc1b18ecfc890dde4aae0a5a5db27dde2796b25e (patch) | |
tree | 8e37e62d98047d218bf8fdeff2f10361fbaab961 /dbus/object_proxy.h | |
parent | ce1402accb9a01358fc1235f1319d934cd611248 (diff) | |
download | chromium_src-bc1b18ecfc890dde4aae0a5a5db27dde2796b25e.zip chromium_src-bc1b18ecfc890dde4aae0a5a5db27dde2796b25e.tar.gz chromium_src-bc1b18ecfc890dde4aae0a5a5db27dde2796b25e.tar.bz2 |
dbus: add ObjectPath type
Rather than use std::string for object paths, add a dbus::ObjectPath type
that wraps one while allowing more type-safety. This solves all sorts of
issues with confusing object paths for strings, and allows us to do
Properties code using templates disambiguating them from strings.
BUG=chromium:109194
TEST=built and run tests
Change-Id: Icaf6f19daea4af23a9d2ec0ed76d2cbd379d680e
Review URL: http://codereview.chromium.org/9378039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/object_proxy.h')
-rw-r--r-- | dbus/object_proxy.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h index 3da4e9b..3a9fab1 100644 --- a/dbus/object_proxy.h +++ b/dbus/object_proxy.h @@ -16,6 +16,7 @@ #include "base/memory/ref_counted.h" #include "base/string_piece.h" #include "base/time.h" +#include "dbus/object_path.h" namespace dbus { @@ -35,7 +36,7 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> { // Bus::GetObjectProxyWithOptions() instead of this constructor. ObjectProxy(Bus* bus, const std::string& service_name, - const std::string& object_path, + const ObjectPath& object_path, int options); // Options to be OR-ed together when calling Bus::GetObjectProxyWithOptions(). @@ -196,7 +197,7 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> { scoped_refptr<Bus> bus_; std::string service_name_; - std::string object_path_; + ObjectPath object_path_; // True if the message filter was added. bool filter_added_; |