Skip to content

Commit

Permalink
Remove unnecessary base::Passed() with base::BindOnce()
Browse files Browse the repository at this point in the history
The documentation on base::Callback<...> (src/docs/callback.md)
recommends against using base::Passed(...) with base::BindOnce.

> Avoid using `base::Passed()` with `base::BindOnce()`, as `std::move()`
> does the same thing and is more familiar.

This CL was uploaded by git cl split.

Bug: none
Change-Id: I0c90795289fc512efd4fe8ec6a196ec67571d58e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611824
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659795}
  • Loading branch information
sdefresne authored and Commit Bot committed May 15, 2019
1 parent 740e9d5 commit 25c1442
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/drive/chromeos/file_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ void FileSystem::GetMetadata(GetFilesystemMetadataCallback callback) {
base::RepeatingClosure closure = base::BarrierClosure(
num_callbacks,
base::BindOnce(&FileSystem::OnGetMetadata, weak_ptr_factory_.GetWeakPtr(),
base::Passed(std::move(callback)), base::Owned(metadata),
std::move(callback), base::Owned(metadata),
base::Owned(team_drive_metadata)));

metadata->refreshing = default_corpus_change_list_loader_->IsRefreshing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ void GetFileForSavingOperation::GetFileForSavingAfterDownload(
file_closer, entry_ptr),
base::BindOnce(
&GetFileForSavingOperation::GetFileForSavingAfterOpenForWrite,
weak_ptr_factory_.GetWeakPtr(), base::Passed(std::move(callback)),
cache_path, std::move(entry), base::Owned(file_closer)));
weak_ptr_factory_.GetWeakPtr(), std::move(callback), cache_path,
std::move(entry), base::Owned(file_closer)));
}

void GetFileForSavingOperation::GetFileForSavingAfterOpenForWrite(
Expand Down

0 comments on commit 25c1442

Please sign in to comment.