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

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: Update after review. 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..f934e870adc11950033ddbdfd5f63ba05ed2636d 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -18,7 +18,6 @@
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -138,6 +137,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 +602,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