| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 void GetFallbackFontForCharacter(int32_t character, | 23 void GetFallbackFontForCharacter(int32_t character, |
| 24 const char* preferred_locale, | 24 const char* preferred_locale, |
| 25 blink::WebFallbackFont* fallbackFont) { | 25 blink::WebFallbackFont* fallbackFont) { |
| 26 TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter"); | 26 TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter"); |
| 27 | 27 |
| 28 Pickle request; | 28 Pickle request; |
| 29 request.WriteInt(LinuxSandbox::METHOD_GET_FALLBACK_FONT_FOR_CHAR); | 29 request.WriteInt(LinuxSandbox::METHOD_GET_FALLBACK_FONT_FOR_CHAR); |
| 30 request.WriteInt(character); | 30 request.WriteInt(character); |
| 31 request.WriteString(preferred_locale); | 31 if (preferred_locale) { |
| 32 request.WriteBool(true); |
| 33 request.WriteString(preferred_locale); |
| 34 } else |
| 35 request.WriteBool(false); |
| 32 | 36 |
| 33 uint8_t buf[512]; | 37 uint8_t buf[512]; |
| 34 const ssize_t n = UnixDomainSocket::SendRecvMsg(GetSandboxFD(), buf, | 38 const ssize_t n = UnixDomainSocket::SendRecvMsg(GetSandboxFD(), buf, |
| 35 sizeof(buf), NULL, request); | 39 sizeof(buf), NULL, request); |
| 36 | 40 |
| 37 std::string family_name; | 41 std::string family_name; |
| 38 std::string filename; | 42 std::string filename; |
| 39 int fontconfigInterfaceId = 0; | 43 int fontconfigInterfaceId = 0; |
| 40 int ttcIndex = 0; | 44 int ttcIndex = 0; |
| 41 bool isBold = false; | 45 bool isBold = false; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 196 } |
| 193 | 197 |
| 194 bool SendZygoteChildPing(int fd) { | 198 bool SendZygoteChildPing(int fd) { |
| 195 return UnixDomainSocket::SendMsg(fd, | 199 return UnixDomainSocket::SendMsg(fd, |
| 196 kZygoteChildPingMessage, | 200 kZygoteChildPingMessage, |
| 197 sizeof(kZygoteChildPingMessage), | 201 sizeof(kZygoteChildPingMessage), |
| 198 std::vector<int>()); | 202 std::vector<int>()); |
| 199 } | 203 } |
| 200 | 204 |
| 201 } // namespace content | 205 } // namespace content |
| OLD | NEW |