Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(726)

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: rebase onto catalog CL Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/public/cpp/lib/connector_impl.cc ('k') | mojo/shell/public/cpp/names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « mojo/shell/public/cpp/lib/connector_impl.cc ('k') | mojo/shell/public/cpp/names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698