[go: nahoru, domu]

task posting v3: TaskRunnerHandle => CurrentDefaultHandle in //base

This refactor was performed with the following scripts:
shell:
https://paste.googleplex.com/6285820754395136
python:
https://paste.googleplex.com/6260505546063872

This does a few sed-like modifications, changing calls to methods of
[...]TaskRunnerHandle to calls to methods of
[...]TaskRunner::CurrentDefaultHandle, using new types for overrides,
and swapping includes.

Bug: 1026641
Change-Id: Ie9ab64c7d63efb379bd37d4def8d49d5d447ee69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4065947
Auto-Submit: Sean Maher <spvw@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1081280}
diff --git a/base/files/file_util.cc b/base/files/file_util.cc
index 8abd9fe..4828866 100644
--- a/base/files/file_util.cc
+++ b/base/files/file_util.cc
@@ -4,6 +4,7 @@
 
 #include "base/files/file_util.h"
 
+#include "base/task/sequenced_task_runner.h"
 #include "build/build_config.h"
 
 #if BUILDFLAG(IS_WIN)
@@ -31,7 +32,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/task/bind_post_task.h"
 #include "base/threading/scoped_blocking_call.h"
-#include "base/threading/sequenced_task_runner_handle.h"
 
 #if BUILDFLAG(IS_WIN)
 #include <windows.h>
@@ -141,7 +141,7 @@
   return BindOnce(&RunAndReply, BindOnce(&DeleteFile, path),
                   reply_callback.is_null()
                       ? std::move(reply_callback)
-                      : BindPostTask(SequencedTaskRunnerHandle::Get(),
+                      : BindPostTask(SequencedTaskRunner::GetCurrentDefault(),
                                      std::move(reply_callback)));
 }
 
@@ -151,7 +151,7 @@
   return BindOnce(&RunAndReply, BindOnce(&DeletePathRecursively, path),
                   reply_callback.is_null()
                       ? std::move(reply_callback)
-                      : BindPostTask(SequencedTaskRunnerHandle::Get(),
+                      : BindPostTask(SequencedTaskRunner::GetCurrentDefault(),
                                      std::move(reply_callback)));
 }