| Index: chrome/browser/chromeos/login/wizard_controller.cc
|
| diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
|
| index c5f63ee385afec71c36194383eaf7432c5f74fb6..9fd826959ba7ca2f25767dd06e43eebcc7927c8c 100644
|
| --- a/chrome/browser/chromeos/login/wizard_controller.cc
|
| +++ b/chrome/browser/chromeos/login/wizard_controller.cc
|
| @@ -591,17 +591,10 @@ void WizardController::OnUpdateCompleted() {
|
| void WizardController::OnEulaAccepted() {
|
| time_eula_accepted_ = base::Time::Now();
|
| StartupUtils::MarkEulaAccepted();
|
| - bool uma_enabled =
|
| - ResolveMetricsReportingEnabled(usage_statistics_reporting_);
|
| -
|
| - CrosSettings::Get()->SetBoolean(kStatsReportingPref, uma_enabled);
|
| - if (uma_enabled) {
|
| -#if defined(GOOGLE_CHROME_BUILD)
|
| - // The crash reporter initialization needs IO to complete.
|
| - base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| - breakpad::InitCrashReporter(std::string());
|
| -#endif
|
| - }
|
| + InitiateMetricsReportingChange(
|
| + usage_statistics_reporting_,
|
| + base::Bind(&WizardController::InitiateMetricsReportingChangeCallback,
|
| + weak_factory_.GetWeakPtr()));
|
|
|
| if (skip_update_enroll_after_eula_) {
|
| PerformPostEulaActions();
|
| @@ -611,6 +604,18 @@ void WizardController::OnEulaAccepted() {
|
| }
|
| }
|
|
|
| +void WizardController::InitiateMetricsReportingChangeCallback(bool enabled) {
|
| + CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled);
|
| + if (!enabled)
|
| + return;
|
| +#if defined(GOOGLE_CHROME_BUILD)
|
| + // The crash reporter initialization needs IO to complete.
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| + breakpad::InitCrashReporter(std::string());
|
| +#endif
|
| +
|
| +}
|
| +
|
| void WizardController::OnUpdateErrorCheckingForUpdate() {
|
| // TODO(nkostylev): Update should be required during OOBE.
|
| // We do not want to block users from being able to proceed to the login
|
|
|