diff --git a/dbus/message.cc b/dbus/message.cc index 486538ab519e52..43fb3bb8b59371 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 4683abeba475e9..3a28fb0b57ebc6 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