refactor: remove stray .c_str() calls for absl::StrFormat() (#47578)

refactor: remove stray .c_str() calls for absl::StrFormat()

StrFormat() understands std::string, std::string_view

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]
2025-06-26 11:41:48 -05:00
committed by GitHub
parent 79d6160bdc
commit 4268bf91e4
10 changed files with 27 additions and 34 deletions

View File

@@ -44,7 +44,7 @@ std::string GetApplicationUserAgent() {
} else {
user_agent = absl::StrFormat(
"%s/%s Chrome/%s " ELECTRON_PRODUCT_NAME "/" ELECTRON_VERSION_STRING,
name.c_str(), browser->GetVersion().c_str(), CHROME_VERSION_STRING);
name, browser->GetVersion(), CHROME_VERSION_STRING);
}
return embedder_support::BuildUserAgentFromProduct(user_agent);
}