refactor: prefer base::circular_deque
over std::deque
(#47193)
* refactor: use base::circular_deque in ResolveProxyHelper Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: use base::circular_deque in GetExtraCrashKeys() refactor: reduce visibility of kMaxCrashKeyValueSize This change is to match Chromium's usage advice from base/containers/README.md: `base:circular_deque` is preferred over `std::deque` to provide consistent performance across platforms. Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- 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:
parent
a4dfd9b6f3
commit
2d71d65415
2 changed files with 11 additions and 13 deletions
|
@ -5,10 +5,10 @@
|
|||
#ifndef ELECTRON_SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_
|
||||
#define ELECTRON_SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_
|
||||
|
||||
#include <deque>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "base/containers/circular_deque.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "mojo/public/cpp/bindings/receiver.h"
|
||||
|
@ -66,7 +66,7 @@ class ResolveProxyHelper
|
|||
// Self-reference. Owned as long as there's an outstanding proxy lookup.
|
||||
scoped_refptr<ResolveProxyHelper> owned_self_;
|
||||
|
||||
std::deque<PendingRequest> pending_requests_;
|
||||
base::circular_deque<PendingRequest> pending_requests_;
|
||||
// Receiver for the currently in-progress request, if any.
|
||||
mojo::Receiver<network::mojom::ProxyLookupClient> receiver_{this};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue