summaryrefslogtreecommitdiffstats
path: root/dbus/message.h
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-23 06:55:22 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-23 06:55:22 +0000
commitca72ff29277e39031e2b409e2a593b25d0066e8a (patch)
treebfadc8aeb37312310f8743ae4ff5e9a631c1c625 /dbus/message.h
parentf9cb2108d32497ca7688db99f144e0dbe73537da (diff)
downloadchromium_src-ca72ff29277e39031e2b409e2a593b25d0066e8a.zip
chromium_src-ca72ff29277e39031e2b409e2a593b25d0066e8a.tar.gz
chromium_src-ca72ff29277e39031e2b409e2a593b25d0066e8a.tar.bz2
Change setters of dbus::Message to return false instead of aborting on errors
With this change, we can safely return error for invalid object path and service name. It still crashes on invalid method name and interface name if we use MethodCall::MethodCall for setting those parameters. BUG=128967 TEST=dbus_unittests Review URL: https://chromiumcodereview.appspot.com/10409065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/message.h')
-rw-r--r--dbus/message.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/dbus/message.h b/dbus/message.h
index 75e4045..0b9834d 100644
--- a/dbus/message.h
+++ b/dbus/message.h
@@ -90,12 +90,12 @@ class Message {
DBusMessage* raw_message() { return raw_message_; }
// Sets the destination, the path, the interface, the member, etc.
- void SetDestination(const std::string& destination);
- void SetPath(const ObjectPath& path);
- void SetInterface(const std::string& interface);
- void SetMember(const std::string& member);
- void SetErrorName(const std::string& error_name);
- void SetSender(const std::string& sender);
+ bool SetDestination(const std::string& destination);
+ bool SetPath(const ObjectPath& path);
+ bool SetInterface(const std::string& interface);
+ bool SetMember(const std::string& member);
+ bool SetErrorName(const std::string& error_name);
+ bool SetSender(const std::string& sender);
void SetSerial(uint32 serial);
void SetReplySerial(uint32 reply_serial);
// SetSignature() does not exist as we cannot do it.