Index: mojo/shell/application_manager.cc |
diff --git a/mojo/shell/application_manager.cc b/mojo/shell/application_manager.cc |
index f71990b6a37775ae8357cde9e61aec4d5173649b..17de9de08a4ae9f42e48c67c27fbf0e05ec0963d 100644 |
--- a/mojo/shell/application_manager.cc |
+++ b/mojo/shell/application_manager.cc |
@@ -134,8 +134,13 @@ void ApplicationManager::ConnectToApplication( |
} |
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. |
+ if (!network_service_ && !requested_gurl.SchemeIs("mojo")) |
+ ConnectToService(GURL("mojo:network_service"), &network_service_); |
new LocalFetcher( |
- resolved_url, GetBaseURLAndQuery(resolved_url, nullptr), |
+ network_service_.get(), resolved_url, |
+ GetBaseURLAndQuery(resolved_url, nullptr), |
base::Bind(callback, NativeApplicationCleanup::DONT_DELETE)); |
return; |
} |