mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user