Commit 73848dc8 authored by Tomasz Tylenda's avatar Tomasz Tylenda Committed by Commit Bot

Migrate base::Bind to base::BindOnce.

The changelist modifies code locations where the caller explicitly
requires base::OnceCallback.

BUG=764795
TESTED=build

Change-Id: I1717303bbdbd42ce3cbe2c33a5db6031b9266d5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462858Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Tomasz Tylenda <ttylenda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816391}
parent c0dc81e3
...@@ -102,9 +102,9 @@ void ArcActiveDirectoryEnrollmentTokenFetcher::DoFetchEnrollmentToken() { ...@@ -102,9 +102,9 @@ void ArcActiveDirectoryEnrollmentTokenFetcher::DoFetchEnrollmentToken() {
? url_loader_factory_for_testing() ? url_loader_factory_for_testing()
: g_browser_process->system_network_context_manager() : g_browser_process->system_network_context_manager()
->GetSharedURLLoaderFactory(), ->GetSharedURLLoaderFactory(),
base::Bind(&ArcActiveDirectoryEnrollmentTokenFetcher:: base::BindOnce(&ArcActiveDirectoryEnrollmentTokenFetcher::
OnEnrollmentTokenResponseReceived, OnEnrollmentTokenResponseReceived,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
em::ActiveDirectoryEnrollPlayUserRequest* enroll_request = em::ActiveDirectoryEnrollPlayUserRequest* enroll_request =
config->request()->mutable_active_directory_enroll_play_user_request(); config->request()->mutable_active_directory_enroll_play_user_request();
......
...@@ -74,8 +74,8 @@ ArcBackgroundAuthCodeFetcher::~ArcBackgroundAuthCodeFetcher() = default; ...@@ -74,8 +74,8 @@ ArcBackgroundAuthCodeFetcher::~ArcBackgroundAuthCodeFetcher() = default;
void ArcBackgroundAuthCodeFetcher::Fetch(FetchCallback callback) { void ArcBackgroundAuthCodeFetcher::Fetch(FetchCallback callback) {
DCHECK(callback_.is_null()); DCHECK(callback_.is_null());
callback_ = std::move(callback); callback_ = std::move(callback);
context_.Prepare(base::Bind(&ArcBackgroundAuthCodeFetcher::OnPrepared, context_.Prepare(base::BindOnce(&ArcBackgroundAuthCodeFetcher::OnPrepared,
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
} }
void ArcBackgroundAuthCodeFetcher::OnPrepared(bool success) { void ArcBackgroundAuthCodeFetcher::OnPrepared(bool success) {
......
...@@ -174,7 +174,7 @@ std::ostream& operator<<(std::ostream& os, Status status) { ...@@ -174,7 +174,7 @@ std::ostream& operator<<(std::ostream& os, Status status) {
ArcTermsOfServiceNegotiator::NegotiationCallback UpdateStatusCallback( ArcTermsOfServiceNegotiator::NegotiationCallback UpdateStatusCallback(
Status* status) { Status* status) {
return base::Bind( return base::BindOnce(
[](Status* status, bool accepted) { [](Status* status, bool accepted) {
*status = accepted ? Status::ACCEPTED : Status::CANCELLED; *status = accepted ? Status::ACCEPTED : Status::CANCELLED;
}, },
......
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