| Index: mojo/shell/mojo_url_resolver.h
|
| diff --git a/mojo/shell/mojo_url_resolver.h b/mojo/shell/mojo_url_resolver.h
|
| index ccd9bf4eeea732c51a33d65f620694325990afd2..b7145dd98a6b859e67bddc0e2769869787f51764 100644
|
| --- a/mojo/shell/mojo_url_resolver.h
|
| +++ b/mojo/shell/mojo_url_resolver.h
|
| @@ -8,6 +8,7 @@
|
| #include <map>
|
| #include <set>
|
|
|
| +#include "base/basictypes.h"
|
| #include "url/gurl.h"
|
|
|
| namespace mojo {
|
| @@ -27,7 +28,8 @@ class MojoURLResolver {
|
| // inserted.
|
| void SetBaseURL(const GURL& base_url);
|
|
|
| - // Add a custom mapping for a particular "mojo:" URL.
|
| + // 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
|
| @@ -39,10 +41,17 @@ class MojoURLResolver {
|
| GURL Resolve(const GURL& mojo_url) const;
|
|
|
| private:
|
| + // Applies all custom mappings for |url|, returning the last non-mapped url.
|
| + // For example, if 'a' maps to 'b' and 'b' maps to 'c' calling this with 'a'
|
| + // returns 'c'.
|
| + GURL ApplyCustomMappings(const GURL& url) const;
|
| +
|
| std::map<GURL, GURL> url_map_;
|
| std::set<GURL> local_file_set_;
|
| GURL default_base_url_;
|
| GURL base_url_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MojoURLResolver);
|
| };
|
|
|
| } // namespace shell
|
|
|