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

* 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-11-30 16:46:45 -06:00 committed by GitHub
parent a92b3944a1
commit dc0c6c6f3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 24 deletions

View file

@ -19,8 +19,6 @@ namespace relauncher::internal {
namespace {
const CharType* kWaitEventName = L"ElectronRelauncherWaitEvent";
struct PROCESS_BASIC_INFORMATION {
union {
NTSTATUS ExitStatus;
@ -98,8 +96,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) {