| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 for (int i = 0; i < num_chars; ++i) { | 250 for (int i = 0; i < num_chars; ++i) { |
| 251 uint32_t c; | 251 uint32_t c; |
| 252 if (!pickle.ReadUInt32(&iter, &c)) { | 252 if (!pickle.ReadUInt32(&iter, &c)) { |
| 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; |
| 260 if (!pickle.ReadString(&iter, &preferred_locale)) |
| 261 return; |
| 262 |
| 263 // TODO(kochi): Pass preferred_locale.c_str() as the third parameter |
| 264 // once https://bugs.webkit.org/show_bug.cgi?id=55453 is landed. |
| 259 WebCString family = WebFontInfo::familyForChars(chars.get(), num_chars); | 265 WebCString family = WebFontInfo::familyForChars(chars.get(), num_chars); |
| 260 | 266 |
| 261 Pickle reply; | 267 Pickle reply; |
| 262 if (family.data()) { | 268 if (family.data()) { |
| 263 reply.WriteString(family.data()); | 269 reply.WriteString(family.data()); |
| 264 } else { | 270 } else { |
| 265 reply.WriteString(""); | 271 reply.WriteString(""); |
| 266 } | 272 } |
| 267 SendRendererReply(fds, reply, -1); | 273 SendRendererReply(fds, reply, -1); |
| 268 } | 274 } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 } | 684 } |
| 679 | 685 |
| 680 RenderSandboxHostLinux::~RenderSandboxHostLinux() { | 686 RenderSandboxHostLinux::~RenderSandboxHostLinux() { |
| 681 if (initialized_) { | 687 if (initialized_) { |
| 682 if (HANDLE_EINTR(close(renderer_socket_)) < 0) | 688 if (HANDLE_EINTR(close(renderer_socket_)) < 0) |
| 683 PLOG(ERROR) << "close"; | 689 PLOG(ERROR) << "close"; |
| 684 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) | 690 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) |
| 685 PLOG(ERROR) << "close"; | 691 PLOG(ERROR) << "close"; |
| 686 } | 692 } |
| 687 } | 693 } |
| OLD | NEW |