fix: modernize-avoid-c-arrays (#44834)

use string_view for constants used in methods that take string_view args

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-25 13:55:19 -05:00 committed by GitHub
parent d8a7c57506
commit 5a0e1ccf73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 69 additions and 62 deletions

View file

@ -70,25 +70,26 @@ namespace electron {
namespace {
const char kChromeUIDevToolsURL[] =
constexpr std::string_view kChromeUIDevToolsURL =
"devtools://devtools/bundled/devtools_app.html?"
"remoteBase=%s&"
"can_dock=%s&"
"toolbarColor=rgba(223,223,223,1)&"
"textColor=rgba(0,0,0,1)&"
"experiments=true";
const char kChromeUIDevToolsRemoteFrontendBase[] =
constexpr std::string_view kChromeUIDevToolsRemoteFrontendBase =
"https://chrome-devtools-frontend.appspot.com/";
const char kChromeUIDevToolsRemoteFrontendPath[] = "serve_file";
constexpr std::string_view kChromeUIDevToolsRemoteFrontendPath = "serve_file";
const char kDevToolsBoundsPref[] = "electron.devtools.bounds";
const char kDevToolsZoomPref[] = "electron.devtools.zoom";
const char kDevToolsPreferences[] = "electron.devtools.preferences";
constexpr std::string_view kDevToolsBoundsPref = "electron.devtools.bounds";
constexpr std::string_view kDevToolsZoomPref = "electron.devtools.zoom";
constexpr std::string_view kDevToolsPreferences =
"electron.devtools.preferences";
const char kFrontendHostId[] = "id";
const char kFrontendHostMethod[] = "method";
const char kFrontendHostParams[] = "params";
const char kTitleFormat[] = "Developer Tools - %s";
constexpr std::string_view kFrontendHostId = "id";
constexpr std::string_view kFrontendHostMethod = "method";
constexpr std::string_view kFrontendHostParams = "params";
constexpr std::string_view kTitleFormat = "Developer Tools - %s";
const size_t kMaxMessageChunkSize = IPC::Channel::kMaximumMessageSize / 4;