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

Unified Diff: mojo/shell/shell.cc

Issue 1775793002: Fix chrome --mash (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. 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 | « no previous file | mojo/shell/tests/connect/connect_test.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/shell.cc
diff --git a/mojo/shell/shell.cc b/mojo/shell/shell.cc
index 4955c971721df8be895d22ca468c8f947bf068a1..277379fc6da672aa740514dcc51bd187c68b2e4a 100644
--- a/mojo/shell/shell.cc
+++ b/mojo/shell/shell.cc
@@ -529,8 +529,10 @@ void Shell::OnGotResolvedName(scoped_ptr<ConnectParams> params,
mojom::CapabilityFilterPtr base_filter,
const String& file_url) {
std::string instance_name = params->target().instance();
- if (instance_name == GetNamePath(params->target().name()))
+ if (instance_name == GetNamePath(params->target().name()) &&
+ resolved_instance != GetNamePath(resolved_name)) {
instance_name = resolved_instance;
+ }
Identity target(params->target().name(), params->target().user_id(),
instance_name);
params->set_target(target);
@@ -562,7 +564,7 @@ void Shell::OnGotResolvedName(scoped_ptr<ConnectParams> params,
// from the original request rather than for the package itself, which will
// always be the same.
CreateShellClient(
- source, Identity(resolved_name, target.user_id(), resolved_instance),
+ source, Identity(resolved_name, target.user_id(), instance_name),
target.name(), std::move(request));
} else {
bool start_sandboxed = false;
« no previous file with comments | « no previous file | mojo/shell/tests/connect/connect_test.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698