Index: shell/application_manager/application_manager.cc |
diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc |
index fb9d467fbdfb407d2d16a42b4a9f5ded45c3e383..1c57f4aeaad755155574a6aef74b12e5e7978c26 100644 |
--- a/shell/application_manager/application_manager.cc |
+++ b/shell/application_manager/application_manager.cc |
@@ -188,9 +188,8 @@ void ApplicationManager::ConnectToApplicationWithParameters( |
&url_response_disk_cache_); |
} |
- if (!url_loader_factory_) { |
- ConnectToService(GURL("mojo:authenticating_url_loader"), |
- &url_loader_factory_); |
+ if (!network_service_) { |
+ ConnectToService(GURL("mojo:network_service"), &network_service_); |
} |
// NOTE: Attempting to initialize the AuthenticationService while connecting |
@@ -203,14 +202,18 @@ void ApplicationManager::ConnectToApplicationWithParameters( |
!EndsWith(resolved_url.path(), "/authentication.mojo", true)) { |
qsr
2015/06/05 10:54:55
I think we should now be able to not need mojo:aut
blundell
2015/06/05 13:24:17
Done.
|
authentication::AuthenticationServicePtr authentication_service; |
ConnectToService(GURL("mojo:authentication"), &authentication_service); |
- url_loader_factory_->SetAuthenticationService( |
- authentication_service.Pass()); |
+ ConnectToService(GURL("mojo:authenticating_url_loader"), |
+ &url_loader_factory_); |
+ mojo::URLLoaderInterceptorFactoryPtr interceptor_factory; |
+ url_loader_factory_->CreateURLLoaderInterceptorFactory( |
+ GetProxy(&interceptor_factory), authentication_service.Pass()); |
+ network_service_->RegisterURLLoaderInterceptor(interceptor_factory.Pass()); |
initialized_authentication_service_ = true; |
} |
new NetworkFetcher(options_.disable_cache, options_.predictable_app_filenames, |
resolved_url, url_response_disk_cache_.get(), |
- url_loader_factory_.get(), callback); |
+ network_service_.get(), callback); |
} |
bool ApplicationManager::ConnectToRunningApplication( |