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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #include <dirent.h> | 6 #include <dirent.h> |
7 | 7 |
8 extern "C" { | 8 extern "C" { |
9 #include <sandbox.h> | 9 #include <sandbox.h> |
10 } | 10 } |
11 | 11 |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/strings/sys_string_conversions.h" | 14 #include "base/strings/sys_string_conversions.h" |
| 15 #include "base/strings/utf_string_conversions.h" |
15 #include "base/test/multiprocess_test.h" | 16 #include "base/test/multiprocess_test.h" |
16 #include "base/utf_string_conversions.h" | |
17 #include "content/common/sandbox_mac.h" | 17 #include "content/common/sandbox_mac.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "testing/multiprocess_func_list.h" | 19 #include "testing/multiprocess_func_list.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 static const char* kSandboxAccessPathKey = "sandbox_dir"; | 23 static const char* kSandboxAccessPathKey = "sandbox_dir"; |
24 static const char* kDeniedSuffix = "_denied"; | 24 static const char* kDeniedSuffix = "_denied"; |
25 | 25 |
26 } // namespace | 26 } // namespace |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 PLOG(ERROR) << "Sandbox breach: was able to write (" | 301 PLOG(ERROR) << "Sandbox breach: was able to write (" |
302 << denied_file2.value() | 302 << denied_file2.value() |
303 << ")"; | 303 << ")"; |
304 return -1; | 304 return -1; |
305 } | 305 } |
306 | 306 |
307 return 0; | 307 return 0; |
308 } | 308 } |
309 | 309 |
310 } // namespace content | 310 } // namespace content |
OLD | NEW |