refactor: use C++20's contains() method (35-x-y) (#45768)

refactor: use C++20's contains() method (#45742)

* chore: use std::map<>::contains() instead of count() or find()

* chore: use std::map<>::contains() instead of base::Contains()
This commit is contained in:
Charles Kerr 2025-02-21 20:45:54 -06:00 committed by GitHub
parent 2da02ec9bc
commit 4c81971213
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 52 additions and 75 deletions

View file

@ -10,7 +10,6 @@
#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/process/process_metrics.h"
#include "content/public/renderer/render_frame.h"
#include "shell/common/api/electron_bindings.h"
@ -158,7 +157,7 @@ void ElectronSandboxedRendererClient::WillReleaseScriptContext(
void ElectronSandboxedRendererClient::EmitProcessEvent(
content::RenderFrame* render_frame,
const char* event_name) {
if (!base::Contains(injected_frames_, render_frame))
if (!injected_frames_.contains(render_frame))
return;
blink::WebLocalFrame* frame = render_frame->GetWebFrame();