OLD | NEW |
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 "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/pickle.h" | 11 #include "base/pickle.h" |
12 #include "base/posix/eintr_wrapper.h" | 12 #include "base/posix/eintr_wrapper.h" |
13 #include "base/posix/unix_domain_socket_linux.h" | 13 #include "base/posix/unix_domain_socket_linux.h" |
14 #include "base/safe_numerics.h" | 14 #include "base/safe_numerics.h" |
15 #include "base/sys_byteorder.h" | 15 #include "base/sys_byteorder.h" |
16 #include "content/common/sandbox_linux/sandbox_linux.h" | 16 #include "content/common/sandbox_linux.h" |
17 #include "third_party/WebKit/public/platform/linux/WebFontFamily.h" | 17 #include "third_party/WebKit/public/platform/linux/WebFontFamily.h" |
18 #include "third_party/WebKit/public/platform/linux/WebFontRenderStyle.h" | 18 #include "third_party/WebKit/public/platform/linux/WebFontRenderStyle.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 void GetFontFamilyForCharacter(int32_t character, | 22 void GetFontFamilyForCharacter(int32_t character, |
23 const char* preferred_locale, | 23 const char* preferred_locale, |
24 blink::WebFontFamily* family) { | 24 blink::WebFontFamily* family) { |
25 TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter"); | 25 TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter"); |
26 | 26 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 ssize_t n = HANDLE_EINTR(pread(fd, output, data_length, data_offset)); | 171 ssize_t n = HANDLE_EINTR(pread(fd, output, data_length, data_offset)); |
172 if (n != base::checked_numeric_cast<ssize_t>(data_length)) | 172 if (n != base::checked_numeric_cast<ssize_t>(data_length)) |
173 return false; | 173 return false; |
174 } | 174 } |
175 *output_length = data_length; | 175 *output_length = data_length; |
176 | 176 |
177 return true; | 177 return true; |
178 } | 178 } |
179 | 179 |
180 } // namespace content | 180 } // namespace content |
OLD | NEW |