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

Side by Side Diff: chrome/nacl/nacl_helper_linux.cc

Issue 8387039: Move content_restriction.h and main_function_params.h to content/public/common, and put them in t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/nacl/nacl_exe_win_64.cc ('k') | chrome/nacl/nacl_main.cc » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A mini-zygote specifically for Native Client. 5 // A mini-zygote specifically for Native Client.
6 6
7 #include "chrome/common/nacl_helper_linux.h" 7 #include "chrome/common/nacl_helper_linux.h"
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
11 #include <sys/socket.h> 11 #include <sys/socket.h>
12 #include <sys/types.h> 12 #include <sys/types.h>
13 13
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/at_exit.h" 17 #include "base/at_exit.h"
18 #include "base/command_line.h"
18 #include "base/eintr_wrapper.h" 19 #include "base/eintr_wrapper.h"
19 #include "base/logging.h" 20 #include "base/logging.h"
20 #include "base/message_loop.h" 21 #include "base/message_loop.h"
21 #include "base/rand_util.h" 22 #include "base/rand_util.h"
22 #include "chrome/nacl/nacl_listener.h" 23 #include "chrome/nacl/nacl_listener.h"
23 #include "content/common/main_function_params.h"
24 #include "content/common/unix_domain_socket_posix.h" 24 #include "content/common/unix_domain_socket_posix.h"
25 #include "ipc/ipc_switches.h" 25 #include "ipc/ipc_switches.h"
26 #include "native_client/src/trusted/service_runtime/sel_memory.h" 26 #include "native_client/src/trusted/service_runtime/sel_memory.h"
27 27
28 namespace { 28 namespace {
29 29
30 bool g_suid_sandbox_active; 30 bool g_suid_sandbox_active;
31 31
32 // The child must mimic the behavior of zygote_main_linux.cc on the child 32 // The child must mimic the behavior of zygote_main_linux.cc on the child
33 // side of the fork. See zygote_main_linux.cc:HandleForkRequest from 33 // side of the fork. See zygote_main_linux.cc:HandleForkRequest from
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 } 166 }
167 // if fork fails, send PID=-1 to zygote 167 // if fork fails, send PID=-1 to zygote
168 if (!UnixDomainSocket::SendMsg(kNaClZygoteDescriptor, &badpid, 168 if (!UnixDomainSocket::SendMsg(kNaClZygoteDescriptor, &badpid,
169 sizeof(badpid), empty)) { 169 sizeof(badpid), empty)) {
170 LOG(ERROR) << "*** send() to zygote failed"; 170 LOG(ERROR) << "*** send() to zygote failed";
171 } 171 }
172 } 172 }
173 CHECK(false); // This routine must not return 173 CHECK(false); // This routine must not return
174 } 174 }
OLDNEW
« no previous file with comments | « chrome/nacl/nacl_exe_win_64.cc ('k') | chrome/nacl/nacl_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698