diff options
author | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 01:12:00 +0000 |
---|---|---|
committer | keybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 01:12:00 +0000 |
commit | 7533518eb4da0560c5bce294176cc42a1a062bfd (patch) | |
tree | ecfab0dfb59d9c1f4c6e7b47c5fbb10e3be30f07 /dbus | |
parent | fc2e3ff0b6deae1941fe28f60db423978fb441d2 (diff) | |
download | chromium_src-7533518eb4da0560c5bce294176cc42a1a062bfd.zip chromium_src-7533518eb4da0560c5bce294176cc42a1a062bfd.tar.gz chromium_src-7533518eb4da0560c5bce294176cc42a1a062bfd.tar.bz2 |
dbus: fix base class of ErrorResponse
dbus::ErrorResponse needs to be a subclass of dbus::Response otherwise
you can't pass it to a dbus::ExportedObject::ResponseSender.
BUG=none
TEST=my code now compiles
Change-Id: I1efba7c2cd9aaed937cac75133ab6b695aeac63b
Review URL: http://codereview.chromium.org/9675002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126053 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/message.cc | 2 | ||||
-rw-r--r-- | dbus/message.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/dbus/message.cc b/dbus/message.cc index 486538a..43fb3bb 100644 --- a/dbus/message.cc +++ b/dbus/message.cc @@ -404,7 +404,7 @@ Response* Response::CreateEmpty() { // ErrorResponse implementation. // -ErrorResponse::ErrorResponse() : Message() { +ErrorResponse::ErrorResponse() : Response() { } ErrorResponse* ErrorResponse::FromRawMessage(DBusMessage* raw_message) { diff --git a/dbus/message.h b/dbus/message.h index 4683abe..3a28fb0 100644 --- a/dbus/message.h +++ b/dbus/message.h @@ -200,16 +200,17 @@ class Response : public Message { // must delete the returned object. Useful for testing. static Response* CreateEmpty(); - private: + protected: // Creates a Response message. The internal raw message is NULL. Response(); + private: DISALLOW_COPY_AND_ASSIGN(Response); }; // ErrorResponse is a type of message used to return an error to the // caller of a method. -class ErrorResponse: public Message { +class ErrorResponse: public Response { public: // Returns a newly created Response from the given raw message of the // type DBUS_MESSAGE_TYPE_METHOD_RETURN. The caller must delete the |