Commit a2a364c6 authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Commit Bot

[base] Apply BindOnceRewriter in //google_apis

This change applies the BindOnceRewriter in //google_apis.
This rewriter replaces calls to base::Bind and base::BindRepeating with
calls to base::BindOnce, in case the result is immediately assigned to a
base::OnceCallback. Given that base::RepeatingCallback is implicitly
convertible to base::OnceCallback, there is no change in functionality.

Steps:
  1. run_tool.py --tool base_bind_rewriters \
                 --tool-arg='--rewriter=bind_to_bind_once'
  2. git cl format

This CL was uploaded by git cl split.

R=kinaba@chromium.org

Bug: 714018
Change-Id: Id6fb28ec93f35e37036c2277d0ec56f92cc7503f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132191Reviewed-by: default avatarKazuhiro Inaba <kinaba@chromium.org>
Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760038}
parent c0c95c9b
......@@ -1182,8 +1182,8 @@ void BatchUploadRequest::AddRequest(BatchableDelegate* request) {
DCHECK(GetChildEntry(request) == child_requests_.end());
DCHECK(!committed_);
child_requests_.push_back(std::make_unique<BatchUploadChildEntry>(request));
request->Prepare(base::Bind(&BatchUploadRequest::OnChildRequestPrepared,
weak_ptr_factory_.GetWeakPtr(), request));
request->Prepare(base::BindOnce(&BatchUploadRequest::OnChildRequestPrepared,
weak_ptr_factory_.GetWeakPtr(), request));
}
void BatchUploadRequest::OnChildRequestPrepared(RequestID request_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment