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

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

Issue 2671263002: Use TaskScheduler instead of blocking pool in wizard_controller.cc. (Closed)
Patch Set: upload Created 3 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 39b5604b3413c0469aa96a2eec0151c137864beb..e7ff0a385948276558f6c5b3e022403afb0c092a 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -21,6 +21,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
@@ -222,7 +223,6 @@ bool NetworkAllowUpdate(const chromeos::NetworkState* network) {
#if defined(GOOGLE_CHROME_BUILD)
void InitializeCrashReporter() {
// The crash reporter initialization needs IO to complete.
- DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
breakpad::InitCrashReporter(std::string());
}
#endif
@@ -718,8 +718,10 @@ void WizardController::OnChangedMetricsReportingState(bool enabled) {
if (!enabled)
return;
#if defined(GOOGLE_CHROME_BUILD)
- if (!content::BrowserThread::PostBlockingPoolTask(
- FROM_HERE, base::Bind(&InitializeCrashReporter))) {
+ if (!base::PostTaskWithTraits(FROM_HERE,
tapted 2017/02/07 02:23:55 FAILED: obj/chrome/browser/chromeos/chromeos/wizar
+ base::TaskTraits().MayBlock().WithPriority(
+ base::TaskPriority::BACKGROUND),
+ base::Bind(&InitializeCrashReporter))) {
LOG(ERROR) << "Failed to start crash reporter initialization.";
}
#endif
« 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