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

Side by Side Diff: services/nacl/nonsfi/content_handler_main_pexe.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 <fcntl.h> 5 #include <fcntl.h>
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "mojo/application/application_runner_chromium.h" 10 #include "mojo/application/application_runner_chromium.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } // namespace anonymous 71 } // namespace anonymous
72 72
73 class PexeContentHandler : public mojo::ApplicationDelegate, 73 class PexeContentHandler : public mojo::ApplicationDelegate,
74 public mojo::ContentHandlerFactory::Delegate { 74 public mojo::ContentHandlerFactory::Delegate {
75 public: 75 public:
76 PexeContentHandler() : content_handler_factory_(this) {} 76 PexeContentHandler() : content_handler_factory_(this) {}
77 77
78 private: 78 private:
79 // Overridden from ApplicationDelegate: 79 // Overridden from ApplicationDelegate:
80 void Initialize(mojo::ApplicationImpl* app) override { 80 void Initialize(mojo::ApplicationImpl* app) override {
81 app->ConnectToService("mojo:pnacl_compile", &compiler_init_); 81 app->ConnectToServiceDeprecated("mojo:pnacl_compile", &compiler_init_);
82 app->ConnectToService("mojo:pnacl_link", &linker_init_); 82 app->ConnectToServiceDeprecated("mojo:pnacl_link", &linker_init_);
83 app->ConnectToService("mojo:files", &files_); 83 app->ConnectToServiceDeprecated("mojo:files", &files_);
84 mojo::files::Error error = mojo::files::Error::INTERNAL; 84 mojo::files::Error error = mojo::files::Error::INTERNAL;
85 files_->OpenFileSystem("app_persistent_cache", 85 files_->OpenFileSystem("app_persistent_cache",
86 GetProxy(&nexe_cache_directory), 86 GetProxy(&nexe_cache_directory),
87 [&error](mojo::files::Error e) { error = e; }); 87 [&error](mojo::files::Error e) { error = e; });
88 CHECK(files_.WaitForIncomingResponse()); 88 CHECK(files_.WaitForIncomingResponse());
89 CHECK_EQ(mojo::files::Error::OK, error); 89 CHECK_EQ(mojo::files::Error::OK, error);
90 } 90 }
91 91
92 // Overridden from ApplicationDelegate: 92 // Overridden from ApplicationDelegate:
93 bool ConfigureIncomingConnection( 93 bool ConfigureIncomingConnection(
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 }; 210 };
211 211
212 } // namespace content_handler 212 } // namespace content_handler
213 } // namespace nacl 213 } // namespace nacl
214 214
215 MojoResult MojoMain(MojoHandle application_request) { 215 MojoResult MojoMain(MojoHandle application_request) {
216 mojo::ApplicationRunnerChromium runner( 216 mojo::ApplicationRunnerChromium runner(
217 new nacl::content_handler::PexeContentHandler()); 217 new nacl::content_handler::PexeContentHandler());
218 return runner.Run(application_request); 218 return runner.Run(application_request);
219 } 219 }
OLDNEW
« no previous file with comments | « services/media/factory_service/network_reader_impl.cc ('k') | services/nacl/sfi/content_handler_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698