refactor: reduce scope of relauncher's internal constants (#44894)

* refactor: make kRelauncherArgSeparator private to relauncher.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: make kRelauncherTypeArg private to relauncher.cc

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: remove unused type relauncher::CharType

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: move private constants into standalone private namespace

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* refactor: move kWaitEventName into the only function that uses it

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
trop[bot] 2024-12-01 07:14:09 -06:00 committed by GitHub
parent 8f790e4e3f
commit 1f4d5cd564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 24 deletions

View file

@ -21,8 +21,6 @@ namespace relauncher::internal {
namespace {
const CharType* kWaitEventName = L"ElectronRelauncherWaitEvent";
struct PROCESS_BASIC_INFORMATION {
union {
NTSTATUS ExitStatus;
@ -100,8 +98,8 @@ StringType AddQuoteForArg(const StringType& arg) {
} // namespace
StringType GetWaitEventName(base::ProcessId pid) {
return base::StrCat(
{kWaitEventName, L"-", base::NumberToWString(static_cast<int>(pid))});
return base::StrCat({L"ElectronRelauncherWaitEvent-",
base::NumberToWString(static_cast<int>(pid))});
}
StringType ArgvToCommandLineString(const StringVector& argv) {