mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
macOS: Add support for and enable the V2 sandbox (issue #2459)
The CEF_USE_SANDBOX define is now used on all platforms.
This commit is contained in:
@@ -9,19 +9,15 @@
|
||||
#include "base/base_paths.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
|
||||
namespace util_mac {
|
||||
|
||||
namespace {
|
||||
|
||||
// Returns the path to the top-level app bundle that contains the main process
|
||||
// executable.
|
||||
base::FilePath GetMainBundlePath() {
|
||||
return base::mac::GetAppBundlePath(GetMainProcessPath());
|
||||
}
|
||||
|
||||
// Returns the path to the Frameworks directory inside the top-level app bundle.
|
||||
base::FilePath GetFrameworksPath() {
|
||||
base::FilePath bundle_path = GetMainBundlePath();
|
||||
@@ -68,6 +64,15 @@ base::FilePath GetMainProcessPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
base::FilePath GetMainBundlePath() {
|
||||
return base::mac::GetAppBundlePath(GetMainProcessPath());
|
||||
}
|
||||
|
||||
std::string GetMainBundleID() {
|
||||
NSBundle* bundle = base::mac::OuterBundle();
|
||||
return base::SysNSStringToUTF8([bundle bundleIdentifier]);
|
||||
}
|
||||
|
||||
base::FilePath GetMainResourcesDirectory() {
|
||||
base::FilePath bundle_path = GetMainBundlePath();
|
||||
if (bundle_path.empty())
|
||||
|
Reference in New Issue
Block a user