refactor: replace base::StringPrintf() calls with absl::StrFormat() (#44552)

refactor: replace base::StringPrintf() calls with absl::StFormat()

The former is now a pass-through for the latter and is slated for removal

Xref: https://issues.chromium.org/issues/40241565

4907781

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-04 13:12:50 -08:00 committed by GitHub
parent 460fc9b452
commit c0b914f6a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 59 additions and 61 deletions

View file

@ -8,11 +8,11 @@
#include "base/functional/bind.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_navigation_ui_data.h"
#include "net/base/ip_endpoint.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/abseil-cpp/absl/strings/str_format.h"
namespace electron {
@ -139,7 +139,7 @@ void ProxyingWebSocket::OnConnectionEstablished(
}
response_->headers =
base::MakeRefCounted<net::HttpResponseHeaders>(base::StringPrintf(
base::MakeRefCounted<net::HttpResponseHeaders>(absl::StrFormat(
"HTTP/%d.%d %d %s", handshake_response_->http_version.major_value(),
handshake_response_->http_version.minor_value(),
handshake_response_->status_code,