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

Side by Side Diff: content/common/child_process_sandbox_support_impl_linux.cc

Issue 687363004: Introduce content_nacl_nonsfi.gyp for nacl_helper_nonsfi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 #include "content/common/child_process_sandbox_support_impl_linux.h" 5 #include "content/common/child_process_sandbox_support_impl_linux.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/debug/trace_event.h" 12 #include "base/debug/trace_event.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/numerics/safe_conversions.h" 14 #include "base/numerics/safe_conversions.h"
15 #include "base/pickle.h" 15 #include "base/pickle.h"
16 #include "base/posix/eintr_wrapper.h" 16 #include "base/posix/eintr_wrapper.h"
17 #include "base/posix/unix_domain_socket_linux.h" 17 #include "base/posix/unix_domain_socket_linux.h"
18 #include "base/sys_byteorder.h" 18 #include "base/sys_byteorder.h"
19 #include "content/common/sandbox_linux/sandbox_linux.h" 19 #include "content/common/sandbox_linux/sandbox_linux.h"
20 #include "content/common/zygote_commands_linux.h"
21 #include "third_party/WebKit/public/platform/linux/WebFallbackFont.h" 20 #include "third_party/WebKit/public/platform/linux/WebFallbackFont.h"
22 #include "third_party/WebKit/public/platform/linux/WebFontRenderStyle.h" 21 #include "third_party/WebKit/public/platform/linux/WebFontRenderStyle.h"
23 22
24 namespace content { 23 namespace content {
25 24
26 void GetFallbackFontForCharacter(int32_t character, 25 void GetFallbackFontForCharacter(int32_t character,
27 const char* preferred_locale, 26 const char* preferred_locale,
28 blink::WebFallbackFont* fallbackFont) { 27 blink::WebFallbackFont* fallbackFont) {
29 TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter"); 28 TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter");
30 29
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 data_length = std::min(data_length, *output_length); 197 data_length = std::min(data_length, *output_length);
199 ssize_t n = HANDLE_EINTR(pread(fd, output, data_length, data_offset)); 198 ssize_t n = HANDLE_EINTR(pread(fd, output, data_length, data_offset));
200 if (n != base::checked_cast<ssize_t>(data_length)) 199 if (n != base::checked_cast<ssize_t>(data_length))
201 return false; 200 return false;
202 } 201 }
203 *output_length = data_length; 202 *output_length = data_length;
204 203
205 return true; 204 return true;
206 } 205 }
207 206
208 bool SendZygoteChildPing(int fd) {
209 return UnixDomainSocket::SendMsg(fd,
210 kZygoteChildPingMessage,
211 sizeof(kZygoteChildPingMessage),
212 std::vector<int>());
213 }
214
215 } // namespace content 207 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698