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

Unified Diff: services/shell/shell.cc

Issue 1942473002: Eliminate mojo:resource_provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
Index: services/shell/shell.cc
diff --git a/services/shell/shell.cc b/services/shell/shell.cc
index 116dfe02774676fd6644b3529e3ae00e8a04883a..25e5b561ef4223787b5a4f7f0dc52561c3f66c5b 100644
--- a/services/shell/shell.cc
+++ b/services/shell/shell.cc
@@ -40,8 +40,6 @@ const char kCapabilityClass_InstanceName[] = "shell:instance_name";
const char kCapabilityClass_AllUsers[] = "shell:all_users";
const char kCapabilityClass_ExplicitClass[] = "shell:explicit_class";
-void EmptyResolverCallback(mojom::ResolveResultPtr result) {}
-
} // namespace
Identity CreateShellIdentity() {
@@ -531,18 +529,17 @@ bool Shell::AcceptConnection(Connection* connection) {
// Shell, private:
void Shell::InitCatalog(mojom::ShellClientPtr catalog) {
+ // TODO(beng): It'd be great to build this from the manifest, however there's
+ // a bit of a chicken-and-egg problem.
+ CapabilitySpec spec;
+ Interfaces interfaces;
+ interfaces.insert("filesystem::Directory");
+ spec.provided["app"] = interfaces;
Instance* instance = CreateInstance(CreateShellIdentity(),
CreateCatalogIdentity(),
- CapabilitySpec());
+ spec);
singletons_.insert(kCatalogName);
instance->StartWithClient(std::move(catalog));
-
- // TODO(beng): this doesn't work anymore.
- // Seed the catalog with manifest info for the shell & catalog.
- mojom::ShellResolverPtr resolver;
- shell_connection_->connector()->ConnectToInterface(kCatalogName, &resolver);
- resolver->ResolveMojoName(kCatalogName, base::Bind(&EmptyResolverCallback));
- resolver->ResolveMojoName(kShellName, base::Bind(&EmptyResolverCallback));
}
mojom::ShellResolver* Shell::GetResolver(const Identity& identity) {

Powered by Google App Engine
This is Rietveld 408576698