Index: mojo/shell/public/cpp/lib/shell_connection.cc |
diff --git a/mojo/shell/public/cpp/lib/shell_connection.cc b/mojo/shell/public/cpp/lib/shell_connection.cc |
index 24210ad40fa8f47b7b6307c76c4117ef2de5df79..7c8b032093e4bba9d3ccf5eb95654e2a68b5bfbf 100644 |
--- a/mojo/shell/public/cpp/lib/shell_connection.cc |
+++ b/mojo/shell/public/cpp/lib/shell_connection.cc |
@@ -19,9 +19,6 @@ namespace mojo { |
//////////////////////////////////////////////////////////////////////////////// |
// ShellConnection, public: |
-ShellConnection::ShellConnection(mojo::ShellClient* client) |
- : ShellConnection(client, nullptr) {} |
- |
ShellConnection::ShellConnection(mojo::ShellClient* client, |
shell::mojom::ShellClientRequest request) |
: client_(client), binding_(this) { |
@@ -29,17 +26,12 @@ ShellConnection::ShellConnection(mojo::ShellClient* client, |
pending_connector_request_ = GetProxy(&connector); |
connector_.reset(new ConnectorImpl(std::move(connector))); |
- if (request.is_pending()) |
- BindToRequest(std::move(request)); |
+ DCHECK(request.is_pending()); |
+ binding_.Bind(std::move(request)); |
} |
ShellConnection::~ShellConnection() {} |
-void ShellConnection::BindToRequest(shell::mojom::ShellClientRequest request) { |
- DCHECK(!binding_.is_bound()); |
- binding_.Bind(std::move(request)); |
-} |
- |
void ShellConnection::SetAppTestConnectorForTesting( |
shell::mojom::ConnectorPtr connector) { |
pending_connector_request_ = nullptr; |