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

Unified Diff: shell/mojo_url_resolver.h

Issue 782013002: Android: decouple mojo shell from the network service. (Closed) Base URL: https://github.com/domokit/mojo.git@build-rule-for-the-network-service
Patch Set: Rebase. Created 6 years 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: shell/mojo_url_resolver.h
diff --git a/shell/mojo_url_resolver.h b/shell/mojo_url_resolver.h
index a18dac440c06adcfc52c77c92edc452d5b4799c6..60e2a3470b9f7e771e71bf3bb33bf6b66f3ffa21 100644
--- a/shell/mojo_url_resolver.h
+++ b/shell/mojo_url_resolver.h
@@ -9,6 +9,7 @@
#include <set>
#include "base/basictypes.h"
+#include "base/files/file_path.h"
#include "url/gurl.h"
namespace mojo {
@@ -28,12 +29,16 @@ class MojoURLResolver {
// inserted.
void SetBaseURL(const GURL& base_url);
+ // Set the location of applications bundled with the Mojo Shell.
+ void SetLocalAppsPath(const base::FilePath& local_apps_path);
+
// Add a custom mapping for a particular "mojo:" URL. If |resolved_url| is
// itself a mojo url normal resolution rules apply.
void AddCustomMapping(const GURL& mojo_url, const GURL& resolved_url);
// Add a local file mapping for a particular "mojo:" URL. This causes the
- // "mojo:" URL to be resolved to a base::DIR_MODULE-relative shared library.
+ // "mojo:" URL to be resolved to a location where local apps are stored
+ // (base::DIR_MODULE unless overriden using SetLocalAppsPath()).
void AddLocalFileMapping(const GURL& mojo_url);
// Resolve the given "mojo:" URL to the URL that should be used to fetch the
@@ -48,7 +53,7 @@ class MojoURLResolver {
std::map<GURL, GURL> url_map_;
std::set<GURL> local_file_set_;
- GURL default_base_url_;
+ GURL local_apps_url_;
GURL base_url_;
DISALLOW_COPY_AND_ASSIGN(MojoURLResolver);
« shell/BUILD.gn ('K') | « shell/context.cc ('k') | shell/mojo_url_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698