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

Unified Diff: services/nacl/nonsfi/pnacl_link.cc

Issue 2019743002: Yet more ApplicationDelegate/ApplicationRunner conversion. (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
« no previous file with comments | « services/nacl/nonsfi/pnacl_compile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/nacl/nonsfi/pnacl_link.cc
diff --git a/services/nacl/nonsfi/pnacl_link.cc b/services/nacl/nonsfi/pnacl_link.cc
index e4c741e55518614eb942eff9af67025c94577a38..9a2ef2454881f3f7c0be40beabc61373d21a9e3e 100644
--- a/services/nacl/nonsfi/pnacl_link.cc
+++ b/services/nacl/nonsfi/pnacl_link.cc
@@ -2,14 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <memory>
-
#include "base/logging.h"
#include "mojo/nacl/nonsfi/file_util.h"
#include "mojo/nacl/nonsfi/nexe_launcher_nonsfi.h"
#include "mojo/public/c/system/main.h"
-#include "mojo/public/cpp/application/application_delegate.h"
-#include "mojo/public/cpp/application/application_runner.h"
+#include "mojo/public/cpp/application/application_impl_base.h"
+#include "mojo/public/cpp/application/run_application.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/nacl/nonsfi/kLdNexe.h"
@@ -38,13 +36,12 @@ class StrongBindingPexeLinkerImpl : public PexeLinkerImpl {
StrongBinding<PexeLinkerInit> strong_binding_;
};
-class MultiPexeLinker : public ApplicationDelegate {
+class MultiPexeLinker : public ApplicationImplBase {
public:
MultiPexeLinker() {}
- // From ApplicationDelegate
- bool ConfigureIncomingConnection(
- ServiceProviderImpl* service_provider_impl) override {
+ // From ApplicationImplBase
+ bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override {
service_provider_impl->AddService<PexeLinkerInit>(
[](const ConnectionContext& connection_context,
InterfaceRequest<PexeLinkerInit> request) {
@@ -58,7 +55,6 @@ class MultiPexeLinker : public ApplicationDelegate {
} // namespace mojo
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunner runner(std::unique_ptr<mojo::nacl::MultiPexeLinker>(
- new mojo::nacl::MultiPexeLinker()));
- return runner.Run(application_request);
+ mojo::nacl::MultiPexeLinker multi_pexe_linker;
+ return mojo::RunMainApplication(application_request, &multi_pexe_linker);
}
« no previous file with comments | « services/nacl/nonsfi/pnacl_compile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698