OLD | NEW |
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/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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 error: | 151 error: |
152 for (std::vector<int>::const_iterator | 152 for (std::vector<int>::const_iterator |
153 i = fds.begin(); i != fds.end(); ++i) { | 153 i = fds.begin(); i != fds.end(); ++i) { |
154 close(*i); | 154 close(*i); |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 void HandleFontMatchRequest(int fd, const Pickle& pickle, PickleIterator iter, | 158 void HandleFontMatchRequest(int fd, const Pickle& pickle, PickleIterator iter, |
159 std::vector<int>& fds) { | 159 std::vector<int>& fds) { |
160 bool filefaceid_valid; | 160 bool filefaceid_valid; |
161 uint32_t filefaceid; | 161 uint32_t filefaceid = 0; |
162 | 162 |
163 if (!pickle.ReadBool(&iter, &filefaceid_valid)) | 163 if (!pickle.ReadBool(&iter, &filefaceid_valid)) |
164 return; | 164 return; |
165 if (filefaceid_valid) { | 165 if (filefaceid_valid) { |
166 if (!pickle.ReadUInt32(&iter, &filefaceid)) | 166 if (!pickle.ReadUInt32(&iter, &filefaceid)) |
167 return; | 167 return; |
168 } | 168 } |
169 bool is_bold, is_italic; | 169 bool is_bold, is_italic; |
170 if (!pickle.ReadBool(&iter, &is_bold) || | 170 if (!pickle.ReadBool(&iter, &is_bold) || |
171 !pickle.ReadBool(&iter, &is_italic)) { | 171 !pickle.ReadBool(&iter, &is_italic)) { |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 } | 722 } |
723 | 723 |
724 RenderSandboxHostLinux::~RenderSandboxHostLinux() { | 724 RenderSandboxHostLinux::~RenderSandboxHostLinux() { |
725 if (initialized_) { | 725 if (initialized_) { |
726 if (HANDLE_EINTR(close(renderer_socket_)) < 0) | 726 if (HANDLE_EINTR(close(renderer_socket_)) < 0) |
727 PLOG(ERROR) << "close"; | 727 PLOG(ERROR) << "close"; |
728 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) | 728 if (HANDLE_EINTR(close(childs_lifeline_fd_)) < 0) |
729 PLOG(ERROR) << "close"; | 729 PLOG(ERROR) << "close"; |
730 } | 730 } |
731 } | 731 } |
OLD | NEW |