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

Side by Side Diff: services/native_support/process_impl.cc

Issue 1975993002: Change InterfaceFactory<I>::Create() to take a ConnectionContext instead of an ApplicationConnectio… (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 unified diff | Download patch
« no previous file with comments | « services/native_support/process_impl.h ('k') | services/native_viewport/app_delegate.h » ('j') | 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 "services/native_support/process_impl.h" 5 #include "services/native_support/process_impl.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 if (setsid() == static_cast<pid_t>(-1)) 44 if (setsid() == static_cast<pid_t>(-1))
45 write(STDERR_FILENO, kErrorMessage, sizeof(kErrorMessage) - 1); 45 write(STDERR_FILENO, kErrorMessage, sizeof(kErrorMessage) - 1);
46 } 46 }
47 47
48 private: 48 private:
49 DISALLOW_COPY_AND_ASSIGN(SetsidPreExecDelegate); 49 DISALLOW_COPY_AND_ASSIGN(SetsidPreExecDelegate);
50 }; 50 };
51 51
52 } // namespace 52 } // namespace
53 53
54 // TODO(vtl): This should do something with the |connection_context|.
54 ProcessImpl::ProcessImpl(scoped_refptr<base::TaskRunner> worker_runner, 55 ProcessImpl::ProcessImpl(scoped_refptr<base::TaskRunner> worker_runner,
55 mojo::ApplicationConnection* connection, 56 const mojo::ConnectionContext& connection_context,
56 mojo::InterfaceRequest<Process> request) 57 mojo::InterfaceRequest<Process> request)
57 : worker_runner_(worker_runner.Pass()), binding_(this, request.Pass()) {} 58 : worker_runner_(worker_runner.Pass()), binding_(this, request.Pass()) {}
58 59
59 ProcessImpl::~ProcessImpl() {} 60 ProcessImpl::~ProcessImpl() {}
60 61
61 void ProcessImpl::Spawn( 62 void ProcessImpl::Spawn(
62 mojo::Array<uint8_t> path, 63 mojo::Array<uint8_t> path,
63 mojo::Array<mojo::Array<uint8_t>> argv, 64 mojo::Array<mojo::Array<uint8_t>> argv,
64 mojo::Array<mojo::Array<uint8_t>> envp, 65 mojo::Array<mojo::Array<uint8_t>> envp,
65 mojo::InterfaceHandle<mojo::files::File> stdin_file, 66 mojo::InterfaceHandle<mojo::files::File> stdin_file,
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 callback.Run(mojo::files::Error::UNKNOWN); 250 callback.Run(mojo::files::Error::UNKNOWN);
250 return; 251 return;
251 } 252 }
252 253
253 new ProcessControllerImpl(worker_runner_, process_controller.Pass(), 254 new ProcessControllerImpl(worker_runner_, process_controller.Pass(),
254 process.Pass(), std::move(process_io_redirection)); 255 process.Pass(), std::move(process_io_redirection));
255 callback.Run(mojo::files::Error::OK); 256 callback.Run(mojo::files::Error::OK);
256 } 257 }
257 258
258 } // namespace native_support 259 } // namespace native_support
OLDNEW
« no previous file with comments | « services/native_support/process_impl.h ('k') | services/native_viewport/app_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698