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

Unified Diff: chrome/browser/component_updater/sw_reporter_installer_win.cc

Issue 2547693002: Use TaskScheduler instead of WorkerPool in sw_reporter_installer_win.cc. (Closed)
Patch Set: fix build error Created 4 years 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/component_updater/sw_reporter_installer_win.cc
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win.cc b/chrome/browser/component_updater/sw_reporter_installer_win.cc
index 5bd11650ce6241cfe54b3a4ddc7b268fb31beabd..34241417ab0b2c0d977c7f03b49d22566ba75fda 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win.cc
@@ -29,8 +29,8 @@
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/task_scheduler/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "base/threading/worker_pool.h"
#include "base/time/time.h"
#include "base/win/registry.h"
#include "base/win/windows_version.h"
@@ -136,7 +136,13 @@ void RunSwReportersAfterStartup(
FROM_HERE, base::ThreadTaskRunnerHandle::Get(),
base::Bind(&safe_browsing::RunSwReporters, invocations, version,
base::ThreadTaskRunnerHandle::Get(),
- base::WorkerPool::GetTaskRunner(true)));
+ // Runs LaunchAndWaitForExit() (srt_fetcher_win.cc).
+ base::CreateTaskRunnerWithTraits(
+ base::TaskTraits()
+ .WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+ .WithPriority(base::TaskPriority::BACKGROUND)
+ .WithWait())));
}
// Ensures |str| contains only alphanumeric characters and characters from
« 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