| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "services/authenticating_url_loader/authenticating_url_loader_app.h" | 5 #include "services/authenticating_url_loader/authenticating_url_loader_app.h" |
| 6 | 6 |
| 7 #include "mojo/application/application_runner_chromium.h" |
| 8 #include "mojo/public/c/system/main.h" |
| 7 #include "mojo/public/cpp/application/application_impl.h" | 9 #include "mojo/public/cpp/application/application_impl.h" |
| 8 #include "services/authenticating_url_loader/authenticating_url_loader_factory_i
mpl.h" | 10 #include "services/authenticating_url_loader/authenticating_url_loader_factory_i
mpl.h" |
| 9 | 11 |
| 10 namespace mojo { | 12 namespace mojo { |
| 11 | 13 |
| 12 AuthenticatingURLLoaderApp::AuthenticatingURLLoaderApp() { | 14 AuthenticatingURLLoaderApp::AuthenticatingURLLoaderApp() { |
| 13 } | 15 } |
| 14 | 16 |
| 15 AuthenticatingURLLoaderApp::~AuthenticatingURLLoaderApp() { | 17 AuthenticatingURLLoaderApp::~AuthenticatingURLLoaderApp() { |
| 16 } | 18 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 31 GURL app_url(connection->GetRemoteApplicationURL()); | 33 GURL app_url(connection->GetRemoteApplicationURL()); |
| 32 GURL app_origin; | 34 GURL app_origin; |
| 33 if (app_url.is_valid()) { | 35 if (app_url.is_valid()) { |
| 34 app_origin = app_url.GetOrigin(); | 36 app_origin = app_url.GetOrigin(); |
| 35 } | 37 } |
| 36 new AuthenticatingURLLoaderFactoryImpl(request.Pass(), app_, | 38 new AuthenticatingURLLoaderFactoryImpl(request.Pass(), app_, |
| 37 &tokens_[app_origin]); | 39 &tokens_[app_origin]); |
| 38 } | 40 } |
| 39 | 41 |
| 40 } // namespace mojo | 42 } // namespace mojo |
| 43 |
| 44 MojoResult MojoMain(MojoHandle application_request) { |
| 45 mojo::ApplicationRunnerChromium runner(new mojo::AuthenticatingURLLoaderApp); |
| 46 return runner.Run(application_request); |
| 47 } |
| OLD | NEW |