| Index: chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc
|
| diff --git a/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc b/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc
|
| index 674de876887a29222753eedc23389b02c05539a5..47babc73befea5aab51591e2da828ba3027f9aa3 100644
|
| --- a/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc
|
| +++ b/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc
|
| @@ -38,9 +38,22 @@
|
|
|
| if (state == mojom::ManagementState::MANAGED_DO_LOST) {
|
| DCHECK(arc::ArcServiceManager::Get());
|
| - ArcAuthService::Get()->RemoveArcData();
|
| - ArcAuthService::Get()->StopAndEnableArc();
|
| + ArcServiceManager::Get()->arc_user_data_service()->RequireUserDataWiped(
|
| + base::Bind(&ArcEnterpriseReportingService::RestartArc,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| + ArcAuthService::Get()->StopArc();
|
| }
|
| }
|
|
|
| +void ArcEnterpriseReportingService::RestartArc(bool result) {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| + if (!result)
|
| + LOG(ERROR) << "Required ARC user data wipe failed.";
|
| +
|
| + // Restart ARC anyway. Let the enterprise reporting instance decide whether
|
| + // the ARC user data wipe is still required or not.
|
| + VLOG(1) << "Restart ARC";
|
| + ArcAuthService::Get()->EnableArc();
|
| +}
|
| +
|
| } // namespace arc
|
|
|