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

Unified Diff: shell/application_manager/application_manager.cc

Issue 859863002: Fix shell URL resolver. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: shell/application_manager/application_manager.cc
diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc
index 2ead72e57b717dec5bd7226c7dd5ec42c9bf8532..29d81fcfc5f466bc8c849f5d52001413189d351e 100644
--- a/shell/application_manager/application_manager.cc
+++ b/shell/application_manager/application_manager.cc
@@ -46,6 +46,10 @@ GURL ApplicationManager::Delegate::ResolveURL(const GURL& url) {
return url;
}
+GURL ApplicationManager::Delegate::ResolveMappings(const GURL& url) {
+ return url;
+}
+
class ApplicationManager::ContentHandlerConnection : public ErrorHandler {
public:
ContentHandlerConnection(ApplicationManager* manager,
@@ -112,15 +116,16 @@ void ApplicationManager::ConnectToApplication(
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services) {
DCHECK(requested_url.is_valid());
- ApplicationLoader* loader = GetLoaderForURL(requested_url,
- DONT_INCLUDE_DEFAULT_LOADER);
+ GURL mapped_url = delegate_->ResolveMappings(requested_url);
+ ApplicationLoader* loader =
+ GetLoaderForURL(mapped_url, DONT_INCLUDE_DEFAULT_LOADER);
if (loader) {
- ConnectToApplicationImpl(requested_url, requested_url, requestor_url,
+ ConnectToApplicationImpl(requested_url, mapped_url, requestor_url,
services.Pass(), exposed_services.Pass(), loader);
return;
}
- GURL resolved_url = delegate_->ResolveURL(requested_url);
+ GURL resolved_url = delegate_->ResolveURL(mapped_url);
loader = GetLoaderForURL(resolved_url, INCLUDE_DEFAULT_LOADER);
if (loader) {
ConnectToApplicationImpl(requested_url, resolved_url, requestor_url,
« no previous file with comments | « shell/application_manager/application_manager.h ('k') | shell/application_manager/application_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698