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

Side by Side Diff: content/browser/renderer_host/render_sandbox_host_linux.cc

Issue 6592065: Pass around preferred language to font fallback selection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the reference bug number of webkit bugzilla in comments. Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/renderer_webkitclient_impl.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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_webkitclient_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698