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

Unified Diff: net/socket/tcp_socket_posix.cc

Issue 2675383002: Use TaskScheduler instead of WorkerPool in tcp_socket_posix.cc. (Closed)
Patch Set: add ScopedTaskScheduler 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 | « chrome/browser/browser_process_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_posix.cc
diff --git a/net/socket/tcp_socket_posix.cc b/net/socket/tcp_socket_posix.cc
index c02e0fc6081818a18a598899dad98410b2b47b66..1e4f6eddf68e8c4b10adf0d1d3c3bd8e0caebb1b 100644
--- a/net/socket/tcp_socket_posix.cc
+++ b/net/socket/tcp_socket_posix.cc
@@ -14,8 +14,7 @@
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/posix/eintr_wrapper.h"
-#include "base/task_runner_util.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "base/time/default_tick_clock.h"
#include "net/base/address_list.h"
#include "net/base/io_buffer.h"
@@ -132,9 +131,9 @@ bool IsTCPFastOpenUserEnabled() {
// do that on the IO thread.
void CheckSupportAndMaybeEnableTCPFastOpen(bool user_enabled) {
#if defined(OS_LINUX) || defined(OS_ANDROID)
- base::PostTaskAndReplyWithResult(
- base::WorkerPool::GetTaskRunner(/*task_is_slow=*/false).get(),
- FROM_HERE,
+ base::PostTaskWithTraitsAndReplyWithResult(
+ FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
base::Bind(SystemSupportsTCPFastOpen),
base::Bind(RegisterTCPFastOpenIntentAndSupport, user_enabled));
#endif
« no previous file with comments | « chrome/browser/browser_process_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698