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

Unified Diff: shell/application_manager/application_manager.cc

Issue 1155283003: Change AuthenticatingURLLoader to be a URLLoaderInterceptor (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Response to review Created 5 years, 6 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 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(

Powered by Google App Engine
This is Rietveld 408576698