зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264811 - Use a const reference and a default constructor to simplify the macOS sandbox code; r=haik
MozReview-Commit-ID: Dtspj7fL9t7 --HG-- extra : rebase_source : 4b85a1d7bd8ad393f032e67ebff0888bcfdd5447
This commit is contained in:
Родитель
5c9899d993
Коммит
724ff5d5bc
|
@ -41,18 +41,8 @@ typedef struct _MacSandboxInfo {
|
||||||
_MacSandboxInfo()
|
_MacSandboxInfo()
|
||||||
: type(MacSandboxType_Default), level(0), hasFilePrivileges(false),
|
: type(MacSandboxType_Default), level(0), hasFilePrivileges(false),
|
||||||
shouldLog(true) {}
|
shouldLog(true) {}
|
||||||
_MacSandboxInfo(const struct _MacSandboxInfo& other)
|
_MacSandboxInfo(const struct _MacSandboxInfo& other) = default;
|
||||||
: type(other.type), level(other.level),
|
|
||||||
hasFilePrivileges(other.hasFilePrivileges),
|
|
||||||
hasSandboxedProfile(other.hasSandboxedProfile),
|
|
||||||
pluginInfo(other.pluginInfo),
|
|
||||||
appPath(other.appPath), appBinaryPath(other.appBinaryPath),
|
|
||||||
appDir(other.appDir), appTempDir(other.appTempDir),
|
|
||||||
profileDir(other.profileDir), debugWriteDir(other.debugWriteDir),
|
|
||||||
testingReadPath1(other.testingReadPath1),
|
|
||||||
testingReadPath2(other.testingReadPath2),
|
|
||||||
testingReadPath3(other.testingReadPath3),
|
|
||||||
testingReadPath4(other.testingReadPath4), shouldLog(other.shouldLog) {}
|
|
||||||
MacSandboxType type;
|
MacSandboxType type;
|
||||||
int32_t level;
|
int32_t level;
|
||||||
bool hasFilePrivileges;
|
bool hasFilePrivileges;
|
||||||
|
@ -75,7 +65,7 @@ typedef struct _MacSandboxInfo {
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
bool StartMacSandbox(MacSandboxInfo aInfo, std::string &aErrorMessage);
|
bool StartMacSandbox(MacSandboxInfo const &aInfo, std::string &aErrorMessage);
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ OSXVersion::GetVersionNumber()
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
bool StartMacSandbox(MacSandboxInfo aInfo, std::string &aErrorMessage)
|
bool StartMacSandbox(MacSandboxInfo const &aInfo, std::string &aErrorMessage)
|
||||||
{
|
{
|
||||||
std::vector<const char *> params;
|
std::vector<const char *> params;
|
||||||
char *profile = NULL;
|
char *profile = NULL;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче