Index: services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_app.cc |
diff --git a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_app.cc b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_app.cc |
index 9dcf03fb40e740c07bb08b1ddd193e7648b3b186..ea4df32abc82da7294de832cb0bf4ea1743e727a 100644 |
--- a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_app.cc |
+++ b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_app.cc |
@@ -24,22 +24,22 @@ void AuthenticatingURLLoaderInterceptorApp::Initialize(ApplicationImpl* app) { |
bool AuthenticatingURLLoaderInterceptorApp::ConfigureIncomingConnection( |
ApplicationConnection* connection) { |
- connection->AddService<AuthenticatingURLLoaderInterceptorMetaFactory>(this); |
+ connection->GetServiceProviderImpl() |
+ .AddService<AuthenticatingURLLoaderInterceptorMetaFactory>( |
+ [this](const ConnectionContext& connection_context, |
+ InterfaceRequest<AuthenticatingURLLoaderInterceptorMetaFactory> |
+ request) { |
+ GURL app_url(connection_context.remote_url); |
+ GURL app_origin; |
+ if (app_url.is_valid()) { |
+ app_origin = app_url.GetOrigin(); |
+ } |
+ new AuthenticatingURLLoaderInterceptorMetaFactoryImpl( |
+ request.Pass(), app_, &tokens_[app_origin]); |
+ }); |
return true; |
} |
-void AuthenticatingURLLoaderInterceptorApp::Create( |
- const mojo::ConnectionContext& connection_context, |
- InterfaceRequest<AuthenticatingURLLoaderInterceptorMetaFactory> request) { |
- GURL app_url(connection_context.remote_url); |
- GURL app_origin; |
- if (app_url.is_valid()) { |
- app_origin = app_url.GetOrigin(); |
- } |
- new AuthenticatingURLLoaderInterceptorMetaFactoryImpl(request.Pass(), app_, |
- &tokens_[app_origin]); |
-} |
- |
} // namespace mojo |
MojoResult MojoMain(MojoHandle application_request) { |