Skip to content

Commit

Permalink
dbus: fix base class of ErrorResponse
Browse files Browse the repository at this point in the history
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
  • Loading branch information
keybuk@chromium.org committed Mar 11, 2012
1 parent fc2e3ff commit 7533518
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dbus/message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ Response* Response::CreateEmpty() {
// ErrorResponse implementation.
//

ErrorResponse::ErrorResponse() : Message() {
ErrorResponse::ErrorResponse() : Response() {
}

ErrorResponse* ErrorResponse::FromRawMessage(DBusMessage* raw_message) {
Expand Down
5 changes: 3 additions & 2 deletions dbus/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7533518

Please sign in to comment.