| 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/url_resolver.h" | 5 #include "mojo/runner/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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "mojo/shell/application_manager/query_util.h" | 11 #include "mojo/runner/filename_util.h" |
| 12 #include "mojo/shell/filename_util.h" | 12 #include "mojo/runner/switches.h" |
| 13 #include "mojo/shell/switches.h" | 13 #include "mojo/shell/query_util.h" |
| 14 #include "url/url_util.h" | 14 #include "url/url_util.h" |
| 15 | 15 |
| 16 namespace mojo { | 16 namespace mojo { |
| 17 namespace shell { | 17 namespace shell { |
| 18 | 18 |
| 19 URLResolver::URLResolver() { | 19 URLResolver::URLResolver() { |
| 20 // Needed to treat first component of mojo URLs as host, not path. | 20 // Needed to treat first component of mojo URLs as host, not path. |
| 21 url::AddStandardScheme("mojo"); | 21 url::AddStandardScheme("mojo"); |
| 22 } | 22 } |
| 23 | 23 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // It's still a mojo: URL, use the default mapping scheme. | 109 // It's still a mojo: URL, use the default mapping scheme. |
| 110 std::string query; | 110 std::string query; |
| 111 GURL base_url = GetBaseURLAndQuery(mojo_url, &query); | 111 GURL base_url = GetBaseURLAndQuery(mojo_url, &query); |
| 112 std::string lib = base_url.host() + ".mojo" + query; | 112 std::string lib = base_url.host() + ".mojo" + query; |
| 113 return mojo_base_url_.Resolve(lib); | 113 return mojo_base_url_.Resolve(lib); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace shell | 117 } // namespace shell |
| 118 } // namespace mojo | 118 } // namespace mojo |
| OLD | NEW |