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

Side by Side Diff: services/nacl/content_handler_main_nonsfi_pexe.cc

Issue 1429953003: Belated code review regarding pexe content handler. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « services/nacl/content_handler_main_nonsfi.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/application/application_runner_chromium.h" 8 #include "mojo/application/application_runner_chromium.h"
9 #include "mojo/application/content_handler_factory.h" 9 #include "mojo/application/content_handler_factory.h"
10 #include "mojo/data_pipe_utils/data_pipe_utils.h" 10 #include "mojo/data_pipe_utils/data_pipe_utils.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 app->ConnectToService("mojo:pnacl_link", &linker_init_); 74 app->ConnectToService("mojo:pnacl_link", &linker_init_);
75 } 75 }
76 76
77 // Overridden from ApplicationDelegate: 77 // Overridden from ApplicationDelegate:
78 bool ConfigureIncomingConnection( 78 bool ConfigureIncomingConnection(
79 mojo::ApplicationConnection* connection) override { 79 mojo::ApplicationConnection* connection) override {
80 connection->AddService(&content_handler_factory_); 80 connection->AddService(&content_handler_factory_);
81 return true; 81 return true;
82 } 82 }
83 83
84 // Overridden from ContentHandlerFactory::ManagedDelegate: 84 // Overridden from ContentHandlerFactory::Delegate:
85 void RunApplication( 85 void RunApplication(
86 mojo::InterfaceRequest<mojo::Application> application_request, 86 mojo::InterfaceRequest<mojo::Application> application_request,
87 mojo::URLResponsePtr response) override { 87 mojo::URLResponsePtr response) override {
88 // Needed to use Mojo interfaces on this thread. 88 // Needed to use Mojo interfaces on this thread.
89 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create()); 89 base::MessageLoop loop(mojo::common::MessagePumpMojo::Create());
90 // Create temporary file for pexe 90 // Create temporary file for pexe
91 base::FilePath pexe_file_path; 91 base::FilePath pexe_file_path;
92 FILE* pexe_fp = CreateAndOpenTemporaryFile(&pexe_file_path); 92 FILE* pexe_fp = CreateAndOpenTemporaryFile(&pexe_file_path);
93 if (!pexe_fp) 93 if (!pexe_fp)
94 LOG(FATAL) << "Could not create temporary file for pexe"; 94 LOG(FATAL) << "Could not create temporary file for pexe";
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 }; 144 };
145 145
146 } // namespace content_handler 146 } // namespace content_handler
147 } // namespace nacl 147 } // namespace nacl
148 148
149 MojoResult MojoMain(MojoHandle application_request) { 149 MojoResult MojoMain(MojoHandle application_request) {
150 mojo::ApplicationRunnerChromium runner( 150 mojo::ApplicationRunnerChromium runner(
151 new nacl::content_handler::PexeContentHandler()); 151 new nacl::content_handler::PexeContentHandler());
152 return runner.Run(application_request); 152 return runner.Run(application_request);
153 } 153 }
OLDNEW
« no previous file with comments | « services/nacl/content_handler_main_nonsfi.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698