dbus: remove service name from ExportedObject
Well-known names in D-Bus are merely aliases to unique connection ids
maintained by the bus, they have no purpose in qualifying object paths
or interfaces and it's perfectly legimiate for a client to make
requests to the unique connection id (e.g. in response to a signal,
which does not reference the well-known name of the origin connection).
Remove the service_name member from dbus::ExportedObject, from its
constructor and from dbus::Bus::GetExportedObject and require code to
call dbus::Bus::RequestOwnership if a well-known name is desired. This
requires making that function callable from the origin thread with
a callback for the return value.
BUG=chromium-os:27101
TEST=dbus_unittests
Change-Id: Ib91de8b68ad9c3b432e224a2c715f0c2ca1af463
Review URL: http://codereview.chromium.org/9668018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125970 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/dbus/exported_object.h b/dbus/exported_object.h
index 24db66e..315ad986 100644
--- a/dbus/exported_object.h
+++ b/dbus/exported_object.h
@@ -35,9 +35,7 @@
public:
// Client code should use Bus::GetExportedObject() instead of this
// constructor.
- ExportedObject(Bus* bus,
- const std::string& service_name,
- const ObjectPath& object_path);
+ ExportedObject(Bus* bus, const ObjectPath& object_path);
// Called to send a response from an exported method. Response* is the
// response message. Callers should pass a NULL Response* in the event
@@ -157,7 +155,6 @@
void* user_data);
scoped_refptr<Bus> bus_;
- std::string service_name_;
ObjectPath object_path_;
bool object_is_registered_;