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

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

Issue 380243002: Support null language for fallbackFontForChar's IPC wrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « content/browser/renderer_host/sandbox_ipc_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/sandbox_ipc_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698