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

Unified Diff: mojo/shell/application_manager.cc

Issue 1755423002: Add a test for application lifecycle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@27amtest
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/services/package_manager/package_manager.cc ('k') | mojo/shell/public/cpp/application_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_manager.cc
diff --git a/mojo/shell/application_manager.cc b/mojo/shell/application_manager.cc
index f7008787df793ba68e331b3cfb9dcbc5ea660f03..3fc995982680bbc7e091d840fd5398062c8bb005 100644
--- a/mojo/shell/application_manager.cc
+++ b/mojo/shell/application_manager.cc
@@ -469,6 +469,13 @@ void ApplicationManager::OnGotResolvedName(
const String& resolved_qualifier,
mojom::CapabilityFilterPtr base_filter,
const String& file_url) {
+ std::string qualifier = params->target().qualifier();
+ if (qualifier == GetNamePath(params->target().name()))
+ qualifier = resolved_qualifier;
+ Identity target(params->target().name(), qualifier,
+ params->target().user_id());
+ params->set_target(target);
+
// It's possible that when this manifest request was issued, another one was
// already in-progress and completed by the time this one did, and so the
// requested application may already be running.
@@ -481,7 +488,6 @@ void ApplicationManager::OnGotResolvedName(
CapabilityFilter filter = GetPermissiveCapabilityFilter();
if (!base_filter.is_null())
filter = base_filter->filter.To<CapabilityFilter>();
- Identity target = params->target();
target.set_filter(filter);
mojom::ShellClientRequest request;
@@ -498,7 +504,7 @@ void ApplicationManager::OnGotResolvedName(
// from the original request rather than for the package itself, which will
// always be the same.
CreateShellClient(
- source, Identity(resolved_name, target.qualifier(), target.user_id()),
+ source, Identity(resolved_name, resolved_qualifier, target.user_id()),
target.name(), std::move(request));
} else {
bool start_sandboxed = false;
« no previous file with comments | « mojo/services/package_manager/package_manager.cc ('k') | mojo/shell/public/cpp/application_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698