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

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

Issue 7841008: Update chrome/nacl.gypi to fix chromeos build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminate unneeded comment, add a dependency Created 9 years, 3 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 | Annotate | Revision Log
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 #include "chrome/common/nacl_fork_delegate_linux.h" 5 #include "chrome/common/nacl_fork_delegate_linux.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 10
(...skipping 28 matching lines...) Expand all
39 // Confirm a couple hard-wired assumptions. 39 // Confirm a couple hard-wired assumptions.
40 // The NaCl constants are from chrome/nacl/nacl_linux_helper.h 40 // The NaCl constants are from chrome/nacl/nacl_linux_helper.h
41 DCHECK(kNaClBrowserDescriptor == browserdesc); 41 DCHECK(kNaClBrowserDescriptor == browserdesc);
42 DCHECK(kNaClSandboxDescriptor == sandboxdesc); 42 DCHECK(kNaClSandboxDescriptor == sandboxdesc);
43 43
44 CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0); 44 CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0);
45 base::file_handle_mapping_vector fds_to_map; 45 base::file_handle_mapping_vector fds_to_map;
46 fds_to_map.push_back(std::make_pair(fds[1], kNaClZygoteDescriptor)); 46 fds_to_map.push_back(std::make_pair(fds[1], kNaClZygoteDescriptor));
47 fds_to_map.push_back(std::make_pair(sandboxdesc, kNaClSandboxDescriptor)); 47 fds_to_map.push_back(std::make_pair(sandboxdesc, kNaClSandboxDescriptor));
48 ready_ = false; 48 ready_ = false;
49 return; // disabling nacl_helper for now
50 FilePath helper_exe; 49 FilePath helper_exe;
51 FilePath helper_bootstrap_exe; 50 FilePath helper_bootstrap_exe;
52 if (PathService::Get(chrome::FILE_NACL_HELPER, &helper_exe) && 51 if (PathService::Get(chrome::FILE_NACL_HELPER, &helper_exe) &&
53 PathService::Get(chrome::FILE_NACL_HELPER_BOOTSTRAP, 52 PathService::Get(chrome::FILE_NACL_HELPER_BOOTSTRAP,
54 &helper_bootstrap_exe) && 53 &helper_bootstrap_exe) &&
55 !RunningOnValgrind()) { 54 !RunningOnValgrind()) {
56 CommandLine cmd_line(helper_bootstrap_exe); 55 CommandLine cmd_line(helper_bootstrap_exe);
57 cmd_line.AppendArgPath(helper_exe); 56 cmd_line.AppendArgPath(helper_exe);
58 cmd_line.AppendArgNative(kNaClHelperAtZero); 57 cmd_line.AppendArgNative(kNaClHelperAtZero);
59 base::LaunchOptions options; 58 base::LaunchOptions options;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 118
120 bool NaClForkDelegate::AckChild(const int fd, 119 bool NaClForkDelegate::AckChild(const int fd,
121 const std::string& channel_switch) { 120 const std::string& channel_switch) {
122 int nwritten = HANDLE_EINTR(write(fd, channel_switch.c_str(), 121 int nwritten = HANDLE_EINTR(write(fd, channel_switch.c_str(),
123 channel_switch.length())); 122 channel_switch.length()));
124 if (nwritten != static_cast<int>(channel_switch.length())) { 123 if (nwritten != static_cast<int>(channel_switch.length())) {
125 return false; 124 return false;
126 } 125 }
127 return true; 126 return true;
128 } 127 }
OLDNEW
« no previous file with comments | « chrome/nacl.gypi ('k') | tools/ld_bfd/ld » ('j') | tools/ld_bfd/ld » ('J')

Powered by Google App Engine
This is Rietveld 408576698