Commit f5c2a352 authored by Tomasz Tylenda's avatar Tomasz Tylenda Committed by Commit Bot

Removing unnecessary calls to AdaptCallbackForRepeating.

TESTED=build

Bug: 730593
Change-Id: Icecb1ce729c82ec02538ed04d642841be12d0799
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463025Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Commit-Queue: Tomasz Tylenda <ttylenda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815544}
parent a6f9f675
...@@ -73,8 +73,7 @@ void ArcRobotAuthCodeFetcher::Fetch(FetchCallback callback) { ...@@ -73,8 +73,7 @@ void ArcRobotAuthCodeFetcher::Fetch(FetchCallback callback) {
->GetSharedURLLoaderFactory(), ->GetSharedURLLoaderFactory(),
base::BindOnce( base::BindOnce(
&ArcRobotAuthCodeFetcher::OnFetchRobotAuthCodeCompleted, &ArcRobotAuthCodeFetcher::OnFetchRobotAuthCodeCompleted,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
base::AdaptCallbackForRepeating(std::move(callback))));
enterprise_management::DeviceServiceApiAccessRequest* request = enterprise_management::DeviceServiceApiAccessRequest* request =
config->request()->mutable_service_api_access_request(); config->request()->mutable_service_api_access_request();
......
...@@ -463,14 +463,10 @@ void ArcPolicyBridge::GetPolicies(GetPoliciesCallback callback) { ...@@ -463,14 +463,10 @@ void ArcPolicyBridge::GetPolicies(GetPoliciesCallback callback) {
void ArcPolicyBridge::ReportCompliance(const std::string& request, void ArcPolicyBridge::ReportCompliance(const std::string& request,
ReportComplianceCallback callback) { ReportComplianceCallback callback) {
VLOG(1) << "ArcPolicyBridge::ReportCompliance"; VLOG(1) << "ArcPolicyBridge::ReportCompliance";
// TODO(crbug.com/730593): Remove AdaptCallbackForRepeating() by updating
// the callee interface.
auto repeating_callback =
base::AdaptCallbackForRepeating(std::move(callback));
data_decoder::DataDecoder::ParseJsonIsolated( data_decoder::DataDecoder::ParseJsonIsolated(
request, request,
base::BindOnce(&ArcPolicyBridge::OnReportComplianceParse, base::BindOnce(&ArcPolicyBridge::OnReportComplianceParse,
weak_ptr_factory_.GetWeakPtr(), repeating_callback)); weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
} }
void ArcPolicyBridge::ReportCloudDpsRequested( void ArcPolicyBridge::ReportCloudDpsRequested(
......
...@@ -75,9 +75,9 @@ void ArcAppInstallEventLogUploader::OnSerialized( ...@@ -75,9 +75,9 @@ void ArcAppInstallEventLogUploader::OnSerialized(
// base::Unretained() is safe here as the destructor cancels any pending // base::Unretained() is safe here as the destructor cancels any pending
// upload, after which the |client_| is guaranteed to not call the callback. // upload, after which the |client_| is guaranteed to not call the callback.
client_->UploadAppInstallReport( client_->UploadAppInstallReport(
std::move(value_report), base::AdaptCallbackForRepeating(base::BindOnce( std::move(value_report),
&ArcAppInstallEventLogUploader::OnUploadDone, base::BindOnce(&ArcAppInstallEventLogUploader::OnUploadDone,
base::Unretained(this)))); base::Unretained(this)));
} }
} // namespace policy } // namespace policy
...@@ -57,9 +57,8 @@ void ArcDataRemover::Run(RunCallback callback) { ...@@ -57,9 +57,8 @@ void ArcDataRemover::Run(RunCallback callback) {
.account_id(); .account_id();
upstart_client->StartJob( upstart_client->StartJob(
kArcRemoveDataUpstartJob, {"CHROMEOS_USER=" + account_id}, kArcRemoveDataUpstartJob, {"CHROMEOS_USER=" + account_id},
base::AdaptCallbackForRepeating( base::BindOnce(&ArcDataRemover::OnDataRemoved, weak_factory_.GetWeakPtr(),
base::BindOnce(&ArcDataRemover::OnDataRemoved, std::move(callback)));
weak_factory_.GetWeakPtr(), std::move(callback))));
} }
void ArcDataRemover::OnDataRemoved(RunCallback callback, bool success) { void ArcDataRemover::OnDataRemoved(RunCallback callback, bool success) {
......
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