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

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

Issue 1706063002: Eliminate ShellClientFactoryConnection & just have the ApplicationManager do it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@factory
Patch Set: . Created 4 years, 10 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/connection_impl.h ('k') | mojo/shell/public/cpp/lib/shell_client_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/connection_impl.cc
diff --git a/mojo/shell/public/cpp/lib/connection_impl.cc b/mojo/shell/public/cpp/lib/connection_impl.cc
index f301711b4f833bf462a95d0f2ac1138c8e8d35a5..d0faa517376c0bd4adb40e45177322ddfbb4c4a5 100644
--- a/mojo/shell/public/cpp/lib/connection_impl.cc
+++ b/mojo/shell/public/cpp/lib/connection_impl.cc
@@ -29,7 +29,6 @@ ConnectionImpl::ConnectionImpl(
: connection_url_(connection_url),
remote_url_(remote_url),
remote_id_(remote_id),
- shell_client_factory_id_(0u),
remote_ids_valid_(false),
local_registry_(std::move(local_interfaces), this),
remote_interfaces_(std::move(remote_interfaces)),
@@ -40,7 +39,6 @@ ConnectionImpl::ConnectionImpl(
ConnectionImpl::ConnectionImpl()
: remote_id_(shell::mojom::Shell::kInvalidApplicationID),
- shell_client_factory_id_(shell::mojom::Shell::kInvalidApplicationID),
remote_ids_valid_(false),
local_registry_(shell::mojom::InterfaceProviderRequest(), this),
allow_all_interfaces_(true),
@@ -50,7 +48,7 @@ ConnectionImpl::~ConnectionImpl() {}
shell::mojom::Shell::ConnectToApplicationCallback
ConnectionImpl::GetConnectToApplicationCallback() {
- return base::Bind(&ConnectionImpl::OnGotRemoteIDs,
+ return base::Bind(&ConnectionImpl::OnGotInstanceID,
weak_factory_.GetWeakPtr());
}
@@ -78,15 +76,6 @@ bool ConnectionImpl::GetRemoteApplicationID(uint32_t* remote_id) const {
return true;
}
-bool ConnectionImpl::GetRemoteShellClientFactoryID(
- uint32_t* shell_client_factory_id) const {
- if (!remote_ids_valid_)
- return false;
-
- *shell_client_factory_id = shell_client_factory_id_;
- return true;
-}
-
void ConnectionImpl::AddRemoteIDCallback(const Closure& callback) {
if (remote_ids_valid_) {
callback.Run();
@@ -114,13 +103,11 @@ base::WeakPtr<Connection> ConnectionImpl::GetWeakPtr() {
////////////////////////////////////////////////////////////////////////////////
// ConnectionImpl, private:
-void ConnectionImpl::OnGotRemoteIDs(uint32_t target_application_id,
- uint32_t shell_client_factory_id) {
+void ConnectionImpl::OnGotInstanceID(uint32_t target_application_id) {
DCHECK(!remote_ids_valid_);
remote_ids_valid_ = true;
remote_id_ = target_application_id;
- shell_client_factory_id_ = shell_client_factory_id;
std::vector<Closure> callbacks;
callbacks.swap(remote_id_callbacks_);
for (auto callback : callbacks)
« no previous file with comments | « mojo/shell/public/cpp/lib/connection_impl.h ('k') | mojo/shell/public/cpp/lib/shell_client_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698