refactor: Convert ProcessSingleton changes to patch (#30594)
* Convert ProcessSingleton changes to patch * Update patch * Polish * Add sandbox check to patch * Add missing includes * Fix linking error * Fix compile error * Apply PR feedback * Fix compile fails * Fix tests * Remove extra patch * Update test
This commit is contained in:
parent
b8372f20a0
commit
e6f781f403
13 changed files with 349 additions and 1621 deletions
|
@ -3,8 +3,12 @@
|
|||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/app/command_line_args.h"
|
||||
|
||||
#include <locale>
|
||||
|
||||
#include "sandbox/policy/switches.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
|
||||
namespace {
|
||||
|
||||
bool IsUrlArg(const base::CommandLine::CharType* arg) {
|
||||
|
@ -51,4 +55,9 @@ bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool IsSandboxEnabled(base::CommandLine* command_line) {
|
||||
return command_line->HasSwitch(switches::kEnableSandbox) ||
|
||||
!command_line->HasSwitch(sandbox::policy::switches::kNoSandbox);
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue