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/common/sandbox_mac.h" | 5 #include "content/common/sandbox_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 extern "C" { | 9 extern "C" { |
10 #include <sandbox.h> | 10 #include <sandbox.h> |
11 } | 11 } |
12 #include <signal.h> | 12 #include <signal.h> |
13 #include <sys/param.h> | 13 #include <sys/param.h> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
19 #include "base/mac/mac_util.h" | 19 #include "base/mac/mac_util.h" |
20 #include "base/rand_util_c.h" | |
21 #include "base/mac/scoped_cftyperef.h" | 20 #include "base/mac/scoped_cftyperef.h" |
22 #include "base/mac/scoped_nsautorelease_pool.h" | 21 #include "base/mac/scoped_nsautorelease_pool.h" |
23 #include "base/memory/scoped_nsobject.h" | 22 #include "base/memory/scoped_nsobject.h" |
| 23 #include "base/rand_util_c.h" |
24 #include "base/string16.h" | 24 #include "base/string16.h" |
25 #include "base/string_piece.h" | 25 #include "base/string_piece.h" |
26 #include "base/string_util.h" | 26 #include "base/string_util.h" |
27 #include "base/stringprintf.h" | 27 #include "base/stringprintf.h" |
28 #include "base/sys_info.h" | 28 #include "base/sys_info.h" |
29 #include "base/sys_string_conversions.h" | 29 #include "base/sys_string_conversions.h" |
30 #include "base/utf_string_conversions.h" | 30 #include "base/utf_string_conversions.h" |
31 #include "content/public/common/content_client.h" | 31 #include "content/public/common/content_client.h" |
32 #include "content/public/common/content_switches.h" | 32 #include "content/public/common/content_switches.h" |
33 #include "grit/content_resources.h" | 33 #include "grit/content_resources.h" |
| 34 #include "ui/gl/gl_surface.h" |
34 #include "unicode/uchar.h" | 35 #include "unicode/uchar.h" |
35 #include "ui/gfx/gl/gl_surface.h" | |
36 | 36 |
37 namespace { | 37 namespace { |
38 | 38 |
39 struct SandboxTypeToResourceIDMapping { | 39 struct SandboxTypeToResourceIDMapping { |
40 content::SandboxType sandbox_type; | 40 content::SandboxType sandbox_type; |
41 int sandbox_profile_resource_id; | 41 int sandbox_profile_resource_id; |
42 }; | 42 }; |
43 | 43 |
44 // Mapping from sandbox process types to resource IDs containing the sandbox | 44 // Mapping from sandbox process types to resource IDs containing the sandbox |
45 // profile for all process types known to content. | 45 // profile for all process types known to content. |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 if (HANDLE_EINTR(fcntl(fd, F_GETPATH, canonical_path)) != 0) { | 575 if (HANDLE_EINTR(fcntl(fd, F_GETPATH, canonical_path)) != 0) { |
576 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " | 576 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " |
577 << path->value(); | 577 << path->value(); |
578 return; | 578 return; |
579 } | 579 } |
580 | 580 |
581 *path = FilePath(canonical_path); | 581 *path = FilePath(canonical_path); |
582 } | 582 } |
583 | 583 |
584 } // namespace sandbox | 584 } // namespace sandbox |
OLD | NEW |