Index: mojo/package_manager/package_manager_impl.cc |
diff --git a/mojo/package_manager/package_manager_impl.cc b/mojo/package_manager/package_manager_impl.cc |
index b85e9defabd52b4d0d59390e2c2bd13629e46acc..8d8e19e32ebb9c4e2f052904b71b673e13d3383d 100644 |
--- a/mojo/package_manager/package_manager_impl.cc |
+++ b/mojo/package_manager/package_manager_impl.cc |
@@ -56,6 +56,10 @@ |
application_manager_ = manager; |
} |
+GURL PackageManagerImpl::ResolveURL(const GURL& url) { |
+ return url_resolver_.get() ? url_resolver_->ResolveMojoURL(url) : url; |
+} |
+ |
void PackageManagerImpl::FetchRequest( |
URLRequestPtr request, |
const shell::Fetcher::FetchCallback& loader_callback) { |
@@ -71,6 +75,7 @@ |
} |
GURL resolved_url = ResolveURL(url); |
+ |
if (resolved_url.SchemeIsFile()) { |
// LocalFetcher uses the network service to infer MIME types from URLs. |
// Skip this for mojo URLs to avoid recursively loading the network service. |
@@ -116,7 +121,7 @@ |
} |
bool PackageManagerImpl::HandleWithContentHandler(shell::Fetcher* fetcher, |
- const GURL& url, |
+ const GURL& unresolved_url, |
base::TaskRunner* task_runner, |
URLResponsePtr* new_response, |
GURL* content_handler_url, |
@@ -147,11 +152,11 @@ |
} |
// The response URL matches a registered content handler. |
- auto alias_iter = application_package_alias_.find(url); |
+ auto alias_iter = application_package_alias_.find(unresolved_url); |
if (alias_iter != application_package_alias_.end()) { |
// We replace the qualifier with the one our package alias requested. |
*new_response = URLResponse::New(); |
- (*new_response)->url = url.spec(); |
+ (*new_response)->url = unresolved_url.spec(); |
// Why can't we use this in single process mode? Because of |
// base::AtExitManager. If you link in ApplicationRunner into your code, and |
@@ -171,9 +176,5 @@ |
return false; |
} |
-GURL PackageManagerImpl::ResolveURL(const GURL& url) { |
- return url_resolver_.get() ? url_resolver_->ResolveMojoURL(url) : url; |
-} |
- |
} // namespace package_manager |
} // namespace mojo |