| 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 "chrome/common/font_config_ipc_linux.h" | 5 #include "content/common/font_config_ipc_linux.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
| 11 #include <sys/uio.h> | 11 #include <sys/uio.h> |
| 12 | 12 |
| 13 #include "base/pickle.h" | 13 #include "base/pickle.h" |
| 14 #include "chrome/common/unix_domain_socket_posix.h" | 14 #include "content/common/unix_domain_socket_posix.h" |
| 15 | 15 |
| 16 FontConfigIPC::FontConfigIPC(int fd) | 16 FontConfigIPC::FontConfigIPC(int fd) |
| 17 : fd_(fd) { | 17 : fd_(fd) { |
| 18 } | 18 } |
| 19 | 19 |
| 20 FontConfigIPC::~FontConfigIPC() { | 20 FontConfigIPC::~FontConfigIPC() { |
| 21 close(fd_); | 21 close(fd_); |
| 22 } | 22 } |
| 23 | 23 |
| 24 bool FontConfigIPC::Match(std::string* result_family, | 24 bool FontConfigIPC::Match(std::string* result_family, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void* iter = NULL; | 101 void* iter = NULL; |
| 102 if (!reply.ReadBool(&iter, &result) || | 102 if (!reply.ReadBool(&iter, &result) || |
| 103 !result) { | 103 !result) { |
| 104 if (result_fd) | 104 if (result_fd) |
| 105 close(result_fd); | 105 close(result_fd); |
| 106 return -1; | 106 return -1; |
| 107 } | 107 } |
| 108 | 108 |
| 109 return result_fd; | 109 return result_fd; |
| 110 } | 110 } |
| OLD | NEW |