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

Unified Diff: services/nacl/nonsfi/pnacl_compile.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/device_info/device_info.cc ('k') | services/nacl/nonsfi/pnacl_link.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/nacl/nonsfi/pnacl_compile.cc
diff --git a/services/nacl/nonsfi/pnacl_compile.cc b/services/nacl/nonsfi/pnacl_compile.cc
index ab80697e75223f5475737aca96124122827b4b4a..d8bcf754c02a04f9510173c21af9a7098230ddb2 100644
--- a/services/nacl/nonsfi/pnacl_compile.cc
+++ b/services/nacl/nonsfi/pnacl_compile.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/kPnaclTranslatorCompile.h"
@@ -41,13 +39,12 @@ class StrongBindingPexeCompilerImpl : public PexeCompilerImpl {
StrongBinding<PexeCompilerInit> strong_binding_;
};
-class MultiPexeCompiler : public ApplicationDelegate {
+class MultiPexeCompiler : public ApplicationImplBase {
public:
MultiPexeCompiler() {}
- // From ApplicationDelegate
- bool ConfigureIncomingConnection(
- ServiceProviderImpl* service_provider_impl) override {
+ // From ApplicationImplBase
+ bool OnAcceptConnection(ServiceProviderImpl* service_provider_impl) override {
service_provider_impl->AddService<PexeCompilerInit>(
[](const ConnectionContext& connection_context,
InterfaceRequest<PexeCompilerInit> request) {
@@ -61,7 +58,6 @@ class MultiPexeCompiler : public ApplicationDelegate {
} // namespace mojo
MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunner runner(std::unique_ptr<mojo::nacl::MultiPexeCompiler>(
- new mojo::nacl::MultiPexeCompiler()));
- return runner.Run(application_request);
+ mojo::nacl::MultiPexeCompiler multi_pexe_compiler;
+ return mojo::RunMainApplication(application_request, &multi_pexe_compiler);
}
« no previous file with comments | « services/device_info/device_info.cc ('k') | services/nacl/nonsfi/pnacl_link.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698