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

Unified Diff: services/shell/shell.cc

Issue 1871223003: Use ShellClientFactory interface to load mojo:profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « services/shell/shell.h ('k') | services/shell/tests/connect/connect_test.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/shell.cc
diff --git a/services/shell/shell.cc b/services/shell/shell.cc
index fac23f19f58049249f6b24cb33ea956b37d23ddc..25db56b4ebec1cf48556f6ee4caf074d4921082b 100644
--- a/services/shell/shell.cc
+++ b/services/shell/shell.cc
@@ -642,22 +642,21 @@ void Shell::AddInstanceListener(mojom::InstanceListenerPtr listener) {
instance_listeners_.AddPtr(std::move(listener));
}
-void Shell::CreateShellClientWithFactory(const Identity& source,
- const Identity& shell_client_factory,
+void Shell::CreateShellClientWithFactory(const Identity& shell_client_factory,
const std::string& name,
mojom::ShellClientRequest request) {
mojom::ShellClientFactory* factory =
- GetShellClientFactory(shell_client_factory, source);
+ GetShellClientFactory(shell_client_factory);
factory->CreateShellClient(std::move(request), name);
}
mojom::ShellClientFactory* Shell::GetShellClientFactory(
- const Identity& shell_client_factory_identity,
- const Identity& source_identity) {
+ const Identity& shell_client_factory_identity) {
auto it = shell_client_factories_.find(shell_client_factory_identity);
if (it != shell_client_factories_.end())
return it->second.get();
+ Identity source_identity(kShellName, mojom::kInheritUserID);
mojom::ShellClientFactoryPtr factory;
ConnectToInterface(this, source_identity, shell_client_factory_identity,
&factory);
@@ -745,7 +744,7 @@ void Shell::OnGotResolvedName(mojom::ShellResolverPtr resolver,
instance->StartWithClient(std::move(client));
Identity factory(result->resolved_name, target.user_id(),
instance_name);
- CreateShellClientWithFactory(source, factory, target.name(),
+ CreateShellClientWithFactory(factory, target.name(),
std::move(request));
} else {
instance->StartWithFilePath(
« no previous file with comments | « services/shell/shell.h ('k') | services/shell/tests/connect/connect_test.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698