OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_RUNNER_URL_RESOLVER_H_ | 5 #ifndef MOJO_RUNNER_URL_RESOLVER_H_ |
6 #define MOJO_RUNNER_URL_RESOLVER_H_ | 6 #define MOJO_RUNNER_URL_RESOLVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace mojo { | 16 namespace mojo { |
17 namespace shell { | 17 namespace runner { |
18 | 18 |
19 // This class supports the mapping of URLs to other URLs. | 19 // This class supports the mapping of URLs to other URLs. |
20 // It's commonly used with mojo: URL, to provide a physical location (i.e. | 20 // It's commonly used with mojo: URL, to provide a physical location (i.e. |
21 // file: or https:) but works with any URL. | 21 // file: or https:) but works with any URL. |
22 // By default, "mojo:" URLs resolve to a file location, with ".mojo" appended, | 22 // By default, "mojo:" URLs resolve to a file location, with ".mojo" appended, |
23 // but that resolution can be customized via the AddCustomMapping method. | 23 // but that resolution can be customized via the AddCustomMapping method. |
24 class URLResolver { | 24 class URLResolver { |
25 public: | 25 public: |
26 URLResolver(); | 26 URLResolver(); |
27 ~URLResolver(); | 27 ~URLResolver(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 private: | 67 private: |
68 using GURLToGURLMap = std::map<GURL, GURL>; | 68 using GURLToGURLMap = std::map<GURL, GURL>; |
69 GURLToGURLMap url_map_; | 69 GURLToGURLMap url_map_; |
70 GURLToGURLMap origin_map_; | 70 GURLToGURLMap origin_map_; |
71 GURL mojo_base_url_; | 71 GURL mojo_base_url_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(URLResolver); | 73 DISALLOW_COPY_AND_ASSIGN(URLResolver); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace shell | 76 } // namespace runner |
77 } // namespace mojo | 77 } // namespace mojo |
78 | 78 |
79 #endif // MOJO_RUNNER_URL_RESOLVER_H_ | 79 #endif // MOJO_RUNNER_URL_RESOLVER_H_ |
OLD | NEW |