Index: chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.cc |
diff --git a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.cc b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.cc |
index ca0fe339fb59128b7a44c4f9c2dadb84d2084f20..ab3f358a4a40d8de1e6ea25a0ff6d45fea0da005 100644 |
--- a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.cc |
+++ b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator.cc |
@@ -81,13 +81,23 @@ void ArcTermsOfServiceDefaultNegotiator::OnMetricsModeChanged(bool enabled, |
void ArcTermsOfServiceDefaultNegotiator::OnBackupAndRestoreModeChanged( |
bool enabled, |
bool managed) { |
- support_host_->SetBackupAndRestorePreferenceCheckbox(enabled, managed); |
+ // Tick the checkbox by default in the unmanaged case, regardless of the pref |
hidehiko
2017/02/15 04:59:16
Ok, then, could you move them to arc_optin_prefere
emaxx
2017/02/15 05:12:31
Hmm, but would it be more appropriate in ArcOptinP
hidehiko
2017/02/15 14:38:43
I think it is ok to modify ArcOptinPreferenceHandl
|
+ // value (which is false by default). In the managed case, follow the managed |
+ // value. |
+ const bool checkbox_checked = enabled || !managed; |
+ support_host_->SetBackupAndRestorePreferenceCheckbox(checkbox_checked, |
+ managed); |
} |
void ArcTermsOfServiceDefaultNegotiator::OnLocationServicesModeChanged( |
bool enabled, |
bool managed) { |
- support_host_->SetLocationServicesPreferenceCheckbox(enabled, managed); |
+ // Tick the checkbox by default in the unmanaged case, regardless of the pref |
+ // value (which is false by default). In the managed case, follow the managed |
+ // value. |
+ const bool checkbox_checked = enabled || !managed; |
+ support_host_->SetLocationServicesPreferenceCheckbox(checkbox_checked, |
+ managed); |
} |
} // namespace arc |