chore: convert session base::Bind instances (#18038)
Convert instances of base::Bind to base::BindOnce and base::BindRepeating as applicable in the session module as well as in Autofill popups.
This commit is contained in:
parent
61effac72a
commit
f316c8470c
4 changed files with 24 additions and 25 deletions
|
@ -30,10 +30,10 @@ ResolveProxyHelper::~ResolveProxyHelper() {
|
|||
}
|
||||
|
||||
void ResolveProxyHelper::ResolveProxy(const GURL& url,
|
||||
const ResolveProxyCallback& callback) {
|
||||
ResolveProxyCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
// Enqueue the pending request.
|
||||
pending_requests_.push_back(PendingRequest(url, callback));
|
||||
pending_requests_.push_back(PendingRequest(url, std::move(callback)));
|
||||
|
||||
// If nothing is in progress, start.
|
||||
if (!binding_.is_bound()) {
|
||||
|
@ -76,7 +76,7 @@ void ResolveProxyHelper::OnProxyLookupComplete(
|
|||
proxy = proxy_info->ToPacString();
|
||||
|
||||
if (!completed_request.callback.is_null())
|
||||
completed_request.callback.Run(proxy);
|
||||
std::move(completed_request.callback).Run(proxy);
|
||||
|
||||
// Start the next request.
|
||||
if (!pending_requests_.empty())
|
||||
|
@ -85,8 +85,8 @@ void ResolveProxyHelper::OnProxyLookupComplete(
|
|||
|
||||
ResolveProxyHelper::PendingRequest::PendingRequest(
|
||||
const GURL& url,
|
||||
const ResolveProxyCallback& callback)
|
||||
: url(url), callback(callback) {}
|
||||
ResolveProxyCallback callback)
|
||||
: url(url), callback(std::move(callback)) {}
|
||||
|
||||
ResolveProxyHelper::PendingRequest::PendingRequest(
|
||||
ResolveProxyHelper::PendingRequest&& pending_request) = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue