refactor: more inline constexpr string view (#44498)

* chore: remove unused electron::kHidProductIdKey

* refactor: make electron::kHidDeviceNameKey inline constexpr std::string_view

refactor: make electron::kHidGuidKey inline constexpr std::string_view

* refactor: make serial_chooser_context keys inline constexpr std::string_view

* refactor: make native_window keys inline constexpr std::string_view

* refactor: make electron::options keys inline constexpr std::string_view pt 1

* fixup! refactor: make electron::options keys inline constexpr std::string_view pt 1

chore: make kElectronNativeWindowKey a base::cstring_view

ui::Widget::GetNativeWindowProperty requires a const char*

* refactor: make electron::options keys inline constexpr std::string_view pt 2

* refactor: make electron::options keys inline constexpr std::string_view pt 3

* refactor: make electron::options keys inline constexpr std::string_view pt 4

* refactor: make electron::options keys inline constexpr std::string_view pt 5

* refactor: make electron::options keys inline constexpr std::string_view pt 6

* refactor: make electron::options keys inline constexpr std::string_view pt 7

* refactor: make electron::options keys inline constexpr std::string_view pt 8

* chore: remove unused file shell/common/options_switches.cc

* docs: add code comment explaining use of base::cstring_view

* fixup! fixup! refactor: make electron::options keys inline constexpr std::string_view pt 1

* chore: use consistent capitalization of the word 'fullscreen'
This commit is contained in:
Charles Kerr 2024-11-04 12:27:49 -06:00 committed by GitHub
parent 48801be8e9
commit f5bdbdb1e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 305 additions and 412 deletions

View file

@ -532,12 +532,16 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
if (process_type == ::switches::kUtilityProcess ||
process_type == ::switches::kRendererProcess) {
// Copy following switches to child process.
static const char* const kCommonSwitchNames[] = {
switches::kStandardSchemes, switches::kEnableSandbox,
switches::kSecureSchemes, switches::kBypassCSPSchemes,
switches::kCORSSchemes, switches::kFetchSchemes,
switches::kServiceWorkerSchemes, switches::kStreamingSchemes,
switches::kCodeCacheSchemes};
static constexpr std::array<const char*, 9U> kCommonSwitchNames = {
switches::kStandardSchemes.c_str(),
switches::kEnableSandbox.c_str(),
switches::kSecureSchemes.c_str(),
switches::kBypassCSPSchemes.c_str(),
switches::kCORSSchemes.c_str(),
switches::kFetchSchemes.c_str(),
switches::kServiceWorkerSchemes.c_str(),
switches::kStreamingSchemes.c_str(),
switches::kCodeCacheSchemes.c_str()};
command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(),
kCommonSwitchNames);
if (process_type == ::switches::kUtilityProcess ||