| 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 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 "sandbox type to resource id mapping incorrect"); | 72 "sandbox type to resource id mapping incorrect"); |
| 73 | 73 |
| 74 } // namespace | 74 } // namespace |
| 75 | 75 |
| 76 // Static variable declarations. | 76 // Static variable declarations. |
| 77 const char* Sandbox::kSandboxEnableLogging = "ENABLE_LOGGING"; | 77 const char* Sandbox::kSandboxEnableLogging = "ENABLE_LOGGING"; |
| 78 const char* Sandbox::kSandboxDisableDenialLogging = | 78 const char* Sandbox::kSandboxDisableDenialLogging = |
| 79 "DISABLE_SANDBOX_DENIAL_LOGGING"; | 79 "DISABLE_SANDBOX_DENIAL_LOGGING"; |
| 80 const char* Sandbox::kSandboxHomedirAsLiteral = "USER_HOMEDIR_AS_LITERAL"; | 80 const char* Sandbox::kSandboxHomedirAsLiteral = "USER_HOMEDIR_AS_LITERAL"; |
| 81 const char* Sandbox::kSandboxElCapOrLater = "ELCAP_OR_LATER"; | 81 const char* Sandbox::kSandboxElCapOrLater = "ELCAP_OR_LATER"; |
| 82 const char* Sandbox::kSandboxMavericks = "IS_MAVERICKS"; |
| 82 const char* Sandbox::kSandboxPermittedDir = "PERMITTED_DIR"; | 83 const char* Sandbox::kSandboxPermittedDir = "PERMITTED_DIR"; |
| 83 const char* Sandbox::kSandboxBundlePath = "BUNDLE_PATH"; | 84 const char* Sandbox::kSandboxBundlePath = "BUNDLE_PATH"; |
| 84 const char* Sandbox::kSandboxLoggingPathAsLiteral = "LOG_FILE_PATH"; | 85 const char* Sandbox::kSandboxLoggingPathAsLiteral = "LOG_FILE_PATH"; |
| 85 const char* Sandbox::kSandboxChromeBundleId = "BUNDLE_ID"; | 86 const char* Sandbox::kSandboxChromeBundleId = "BUNDLE_ID"; |
| 86 const char* Sandbox::kSandboxComponentPath = "COMPONENT_PATH"; | 87 const char* Sandbox::kSandboxComponentPath = "COMPONENT_PATH"; |
| 87 const char* Sandbox::kSandboxChromePID = "CHROMIUM_PID"; | 88 const char* Sandbox::kSandboxChromePID = "CHROMIUM_PID"; |
| 88 | 89 |
| 89 // Warm up System APIs that empirically need to be accessed before the Sandbox | 90 // Warm up System APIs that empirically need to be accessed before the Sandbox |
| 90 // is turned on. | 91 // is turned on. |
| 91 // This method is layed out in blocks, each one containing a separate function | 92 // This method is layed out in blocks, each one containing a separate function |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { | 325 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { |
| 325 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " | 326 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " |
| 326 << path.value(); | 327 << path.value(); |
| 327 return path; | 328 return path; |
| 328 } | 329 } |
| 329 | 330 |
| 330 return base::FilePath(canonical_path); | 331 return base::FilePath(canonical_path); |
| 331 } | 332 } |
| 332 | 333 |
| 333 } // namespace content | 334 } // namespace content |
| OLD | NEW |