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 #include "mojo/shell/mojo_url_resolver.h" | 5 #include "shell/mojo_url_resolver.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "mojo/shell/filename_util.h" | 11 #include "shell/filename_util.h" |
12 #include "url/url_util.h" | 12 #include "url/url_util.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace shell { | 15 namespace shell { |
16 namespace { | 16 namespace { |
17 | 17 |
18 GURL AddTrailingSlashIfNeeded(const GURL& url) { | 18 GURL AddTrailingSlashIfNeeded(const GURL& url) { |
19 if (!url.has_path() || *url.path().rbegin() == '/') | 19 if (!url.has_path() || *url.path().rbegin() == '/') |
20 return url; | 20 return url; |
21 | 21 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 std::map<GURL, GURL>::const_iterator it = url_map_.find(mapped_url); | 81 std::map<GURL, GURL>::const_iterator it = url_map_.find(mapped_url); |
82 if (it == url_map_.end()) | 82 if (it == url_map_.end()) |
83 break; | 83 break; |
84 mapped_url = it->second; | 84 mapped_url = it->second; |
85 } | 85 } |
86 return mapped_url; | 86 return mapped_url; |
87 } | 87 } |
88 | 88 |
89 } // namespace shell | 89 } // namespace shell |
90 } // namespace mojo | 90 } // namespace mojo |
OLD | NEW |