| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/renderer_host/render_sandbox_host_linux.h" | 5 #include "content/browser/renderer_host/render_sandbox_host_linux.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <fontconfig/fontconfig.h> | 8 #include <fontconfig/fontconfig.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 return; | 253 return; |
| 254 } | 254 } |
| 255 | 255 |
| 256 chars[i] = c; | 256 chars[i] = c; |
| 257 } | 257 } |
| 258 | 258 |
| 259 std::string preferred_locale; | 259 std::string preferred_locale; |
| 260 if (!pickle.ReadString(&iter, &preferred_locale)) | 260 if (!pickle.ReadString(&iter, &preferred_locale)) |
| 261 return; | 261 return; |
| 262 | 262 |
| 263 // TODO(kochi): Pass preferred_locale.c_str() as the third parameter | 263 WebCString family = WebFontInfo::familyForChars(chars.get(), |
| 264 // once https://bugs.webkit.org/show_bug.cgi?id=55453 is landed. | 264 num_chars, |
| 265 WebCString family = WebFontInfo::familyForChars(chars.get(), num_chars); | 265 preferred_locale.c_str()); |
| 266 | 266 |
| 267 Pickle reply; | 267 Pickle reply; |
| 268 if (family.data()) { | 268 if (family.data()) { |
| 269 reply.WriteString(family.data()); | 269 reply.WriteString(family.data()); |
| 270 } else { | 270 } else { |
| 271 reply.WriteString(""); | 271 reply.WriteString(""); |
| 272 } | 272 } |
| 273 SendRendererReply(fds, reply, -1); | 273 SendRendererReply(fds, reply, -1); |
| 274 } | 274 } |
| 275 | 275 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 } | 684 } |
| 685 | 685 |
| 686 RenderSandboxHostLinux::~RenderSandboxHostLinux() { | 686 RenderSandboxHostLinux::~RenderSandboxHostLinux() { |
| 687 if (initialized_) { | 687 if (initialized_) { |
| 688 if (HANDLE_EINTR(close(renderer_socket_)) < 0) | 688 if (HANDLE_EINTR(close(renderer_socket_)) < 0) |
| 689 PLOG(ERROR) << "close"; | 689 PLOG(ERROR) << "close"; |
| 690 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) | 690 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) |
| 691 PLOG(ERROR) << "close"; | 691 PLOG(ERROR) << "close"; |
| 692 } | 692 } |
| 693 } | 693 } |
| OLD | NEW |