Chromium Code Reviews

Unified Diff: mojo/shell/public/cpp/lib/shell_connection.cc

Issue 1801963002: Change primordial pipes to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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;

Powered by Google App Engine