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

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

Issue 11293210: Move global_descriptors to base/posix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <link.h> 10 #include <link.h>
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13 #include <sys/socket.h> 13 #include <sys/socket.h>
14 #include <sys/types.h> 14 #include <sys/types.h>
15 15
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "base/at_exit.h" 19 #include "base/at_exit.h"
20 #include "base/command_line.h" 20 #include "base/command_line.h"
21 #include "base/eintr_wrapper.h" 21 #include "base/eintr_wrapper.h"
22 #include "base/global_descriptors_posix.h"
23 #include "base/json/string_escape.h" 22 #include "base/json/string_escape.h"
24 #include "base/logging.h" 23 #include "base/logging.h"
25 #include "base/message_loop.h" 24 #include "base/message_loop.h"
25 #include "base/posix/global_descriptors.h"
26 #include "base/posix/unix_domain_socket.h" 26 #include "base/posix/unix_domain_socket.h"
27 #include "base/rand_util.h" 27 #include "base/rand_util.h"
28 #include "chrome/nacl/nacl_listener.h" 28 #include "chrome/nacl/nacl_listener.h"
29 #include "crypto/nss_util.h" 29 #include "crypto/nss_util.h"
30 #include "ipc/ipc_descriptors.h" 30 #include "ipc/ipc_descriptors.h"
31 #include "ipc/ipc_switches.h" 31 #include "ipc/ipc_switches.h"
32 #include "sandbox/linux/services/libc_urandom_override.h" 32 #include "sandbox/linux/services/libc_urandom_override.h"
33 33
34 namespace { 34 namespace {
35 35
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 _exit(-1); 274 _exit(-1);
275 } 275 }
276 // if fork fails, send PID=-1 to zygote 276 // if fork fails, send PID=-1 to zygote
277 if (!UnixDomainSocket::SendMsg(kNaClZygoteDescriptor, &badpid, 277 if (!UnixDomainSocket::SendMsg(kNaClZygoteDescriptor, &badpid,
278 sizeof(badpid), empty)) { 278 sizeof(badpid), empty)) {
279 LOG(ERROR) << "*** send() to zygote failed"; 279 LOG(ERROR) << "*** send() to zygote failed";
280 } 280 }
281 } 281 }
282 CHECK(false); // This routine must not return 282 CHECK(false); // This routine must not return
283 } 283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698