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 8ec067b10d9772a06920f9d4ad0bddc74de9413f..3d79ea7053040f7d249f415f1bc4a19ced668605 100644 |
--- a/chrome/browser/chromeos/login/wizard_controller.cc |
+++ b/chrome/browser/chromeos/login/wizard_controller.cc |
@@ -138,6 +138,14 @@ bool IsRemoraRequisition() { |
->IsRemoraRequisition(); |
} |
+#if defined(GOOGLE_CHROME_BUILD) |
+void InitializeCrashReporter() { |
+ // The crash reporter initialization needs IO to complete. |
+ DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); |
+ breakpad::InitCrashReporter(std::string()); |
+} |
+#endif |
+ |
} // namespace |
namespace chromeos { |
@@ -595,11 +603,11 @@ void WizardController::InitiateMetricsReportingChangeCallback(bool 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()); |
+ if (!content::BrowserThread::PostBlockingPoolTask( |
+ FROM_HERE, base::Bind(&InitializeCrashReporter))) { |
+ LOG(ERROR) << "Failed to start crash reporter initialization."; |
+ } |
#endif |
- |
} |
void WizardController::OnUpdateErrorCheckingForUpdate() { |