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

Unified Diff: mojo/shell/application_manager.cc

Issue 1728083002: Extract a Connector interface from Shell that can be cloned & passed to other threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@12uid
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/application_manager.h ('k') | mojo/shell/background/background_shell.cc » ('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 c24e36a04c4d8567a8849d35c956602aebf385f4..61520bfef5c5f6ff5b2aac97b8924033a83401f2 100644
--- a/mojo/shell/application_manager.cc
+++ b/mojo/shell/application_manager.cc
@@ -78,12 +78,12 @@ void ApplicationManager::Connect(scoped_ptr<ConnectParams> params) {
params->target().url().spec());
DCHECK(params->target().url().is_valid());
- if (params->target().user_id() == mojom::Shell::kUserInherit) {
+ if (params->target().user_id() == mojom::Connector::kUserInherit) {
ApplicationInstance* source = GetApplicationInstance(params->source());
Identity target = params->target();
// TODO(beng): we should CHECK source.
target.set_user_id(source ? source->identity().user_id()
- : mojom::Shell::kUserRoot);
+ : mojom::Connector::kUserRoot);
params->set_target(target);
}
@@ -179,8 +179,8 @@ void ApplicationManager::CreateInstanceForHandle(
// client code using this identity.
CapabilityFilter local_filter = filter->filter.To<CapabilityFilter>();
// TODO(beng): obtain userid from the inbound connection.
- Identity target_id(url.To<GURL>(), std::string(), mojom::Shell::kUserInherit,
- local_filter);
+ Identity target_id(url.To<GURL>(), std::string(),
+ mojom::Connector::kUserInherit, local_filter);
mojom::ShellClientRequest request;
ApplicationInstance* instance = CreateInstance(target_id, &request);
instance->BindPIDReceiver(std::move(pid_receiver));
@@ -223,7 +223,7 @@ bool ApplicationManager::ConnectToExistingInstance(
ApplicationInstance* instance = GetApplicationInstance((*params)->target());
if (!instance) {
Identity root_identity = (*params)->target();
- root_identity.set_user_id(mojom::Shell::kUserRoot);
+ root_identity.set_user_id(mojom::Connector::kUserRoot);
instance = GetApplicationInstance(root_identity);
if (!instance) return false;
}
« no previous file with comments | « mojo/shell/application_manager.h ('k') | mojo/shell/background/background_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698