Index: mojo/application/public/cpp/application_connection.h |
diff --git a/mojo/application/public/cpp/application_connection.h b/mojo/application/public/cpp/application_connection.h |
index 5fe14ef84109c2a2978e1ca41de6deaa10db4d13..adf4995d83d1298eb3e5c34f04f9dac10ef4c5dc 100644 |
--- a/mojo/application/public/cpp/application_connection.h |
+++ b/mojo/application/public/cpp/application_connection.h |
@@ -45,11 +45,7 @@ class ServiceConnector; |
// close a connection, call CloseConnection which will destroy this object. |
class ApplicationConnection { |
public: |
- ApplicationConnection(); |
- |
- // Closes the connection and destroys this object. This is the only valid way |
- // to destroy this object. |
- void CloseConnection(); |
+ virtual ~ApplicationConnection() {} |
// See class description for details. |
virtual void SetServiceConnector(ServiceConnector* connector) = 0; |
@@ -107,21 +103,10 @@ class ApplicationConnection { |
const Closure& handler) = 0; |
protected: |
- virtual ~ApplicationConnection(); |
- |
- // Called to give the derived type to perform some cleanup before destruction. |
- virtual void OnCloseConnection() = 0; |
- |
- private: |
// Returns true if the connector was set, false if it was not set (e.g. by |
// some filtering policy preventing this interface from being exposed). |
virtual bool SetServiceConnectorForName(ServiceConnector* service_connector, |
const std::string& name) = 0; |
- |
- // Ensures that CloseConnection can only be called once and the |
- // ApplicationConnection's destructor can only be called after the connection |
- // is closed. |
- bool connection_closed_; |
}; |
} // namespace mojo |