summaryrefslogtreecommitdiffstats
path: root/mojo/shell/fetcher/url_resolver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mojo/shell/fetcher/url_resolver.cc')
-rw-r--r--mojo/shell/fetcher/url_resolver.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/mojo/shell/fetcher/url_resolver.cc b/mojo/shell/fetcher/url_resolver.cc
index 499d9fdb..0b2c182 100644
--- a/mojo/shell/fetcher/url_resolver.cc
+++ b/mojo/shell/fetcher/url_resolver.cc
@@ -47,5 +47,18 @@ GURL URLResolver::ResolveMojoURL(const GURL& mojo_url) const {
}
}
+GURL URLResolver::ResolveMojoManifest(const GURL& mojo_url) const {
+ // TODO(beng): think more about how this should be done for exe targets.
+ if (mojo_url.SchemeIs("mojo")) {
+ std::string host = GetBaseURLAndQuery(mojo_url, nullptr).host();
+ return mojo_base_url_.Resolve(host +
+ "/manifest.json");
+ } else if (mojo_url.SchemeIs("exe")) {
+ return mojo_base_url_.Resolve(GetBaseURLAndQuery(mojo_url, nullptr).host() +
+ "_manifest.json");
+ }
+ return GURL();
+}
+
} // namespace shell
} // namespace mojo