Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1191)

Unified Diff: mojo/package_manager/package_manager_impl.cc

Issue 1354813002: Revert of Don't use resolved url for instance identity in ApplicationManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/package_manager/package_manager_impl.h ('k') | mojo/shell/application_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « mojo/package_manager/package_manager_impl.h ('k') | mojo/shell/application_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698