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:
Shelley Vohr 2019-05-01 13:45:08 -07:00 committed by GitHub
parent 61effac72a
commit f316c8470c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 25 deletions

View file

@ -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;