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

Unified Diff: services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_app.cc

Issue 1981513002: ApplicationConnection devolution, part 2.2. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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: 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) {

Powered by Google App Engine
This is Rietveld 408576698