Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2713)

Unified Diff: chrome/browser/chromeos/login/wizard_controller.cc

Issue 911583003: ChromeOS: Remove ThreadRestrictions::ScopedAllowIO from WizardController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698