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/renderer/renderer_sandbox_support_linux.h" | 5 #include "chrome/renderer/renderer_sandbox_support_linux.h" |
6 | 6 |
7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
8 | 8 |
9 #include "base/eintr_wrapper.h" | 9 #include "base/eintr_wrapper.h" |
10 #include "base/global_descriptors_posix.h" | 10 #include "base/global_descriptors_posix.h" |
11 #include "base/pickle.h" | 11 #include "base/pickle.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "chrome/common/chrome_descriptors.h" | 13 #include "chrome/common/chrome_descriptors.h" |
14 #include "chrome/common/sandbox_methods_linux.h" | 14 #include "content/common/sandbox_methods_linux.h" |
15 #include "content/common/unix_domain_socket_posix.h" | 15 #include "content/common/unix_domain_socket_posix.h" |
16 | 16 |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRenderSt
yle.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRenderSt
yle.h" |
18 | 18 |
19 static int GetSandboxFD() { | 19 static int GetSandboxFD() { |
20 return kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor; | 20 return kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor; |
21 } | 21 } |
22 | 22 |
23 namespace renderer_sandbox_support { | 23 namespace renderer_sandbox_support { |
24 | 24 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 *output_length = length; | 181 *output_length = length; |
182 n = HANDLE_EINTR(pread(fd, output, length, offset)); | 182 n = HANDLE_EINTR(pread(fd, output, length, offset)); |
183 if (n != static_cast<ssize_t>(length)) | 183 if (n != static_cast<ssize_t>(length)) |
184 return false; | 184 return false; |
185 | 185 |
186 return true; | 186 return true; |
187 } | 187 } |
188 | 188 |
189 } // namespace render_sandbox_support | 189 } // namespace render_sandbox_support |
OLD | NEW |