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

Unified Diff: chrome/browser/chromeos/system/automatic_reboot_manager.cc

Issue 2770783002: Use TaskScheduler instead of blocking pool in automatic_reboot_manager.cc. (Closed)
Patch Set: add-include Created 3 years, 8 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 | chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/automatic_reboot_manager.cc
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
index 5d862c1975adad2dbc51e695542f81169e61e2bc..89f1004eaf901781c7175d65aa4dd3bd81b1f446 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager.cc
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
@@ -26,6 +26,7 @@
#include "base/posix/eintr_wrapper.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_restrictions.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -235,8 +236,13 @@ void AutomaticRebootManager::UpdateStatusChanged(
return;
}
- content::BrowserThread::PostBlockingPoolTask(
- FROM_HERE, base::Bind(&SaveUpdateRebootNeededUptime));
+ base::PostTaskWithTraits(
+ FROM_HERE,
+ base::TaskTraits()
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithShutdownBehavior(base::TaskShutdownBehavior::BLOCK_SHUTDOWN)
+ .MayBlock(),
+ base::Bind(&SaveUpdateRebootNeededUptime));
update_reboot_needed_time_ = clock_->NowTicks();
have_update_reboot_needed_time_ = true;
« no previous file with comments | « no previous file | chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698