task posting v3: moving away from ThreadTaskRunnerHandle

To continue the migration away from TaskRunnerHandles, the codebase
was refactored using the following scripts:
shell script:
https://paste.googleplex.com/4673967729147904
python:
https://paste.googleplex.com/5824001174667264

This will do a few sed-like modifications, changing calls to methods of
ThreadTaskRunnerHandle to calls to methods of
SingleThreadTaskRunner::CurrentDefaultHandle, and swapping includes.

Bug: 1026641
AX-Relnotes: n/a.
Change-Id: Ia33b6dfebb15937481c619f5c838720ce7bb2676
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4031817
Commit-Queue: Gabriel Charette <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Owners-Override: Gabriel Charette <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1074085}
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index 5984eced..9b5b47a 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -14,7 +14,6 @@
 #include "base/notreached.h"
 #include "base/strings/string_util.h"
 #include "base/task/single_thread_task_runner.h"
-#include "base/threading/thread_task_runner_handle.h"
 #include "base/values.h"
 #include "net/base/auth.h"
 #include "net/base/io_buffer.h"
@@ -283,7 +282,7 @@
   std::move(callback).Run(result);
 
   if (end_stream_state_ == EndStreamState::kEndStreamReceived) {
-    base::ThreadTaskRunnerHandle::Get()->PostTask(
+    base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
         FROM_HERE, base::BindOnce(&SpdyProxyClientSocket::MaybeSendEndStream,
                                   weak_factory_.GetMutableWeakPtr()));
   }
@@ -482,7 +481,7 @@
     if (end_stream_state_ == EndStreamState::kNone) {
       // The peer sent END_STREAM. Schedule a DATA frame with END_STREAM.
       end_stream_state_ = EndStreamState::kEndStreamReceived;
-      base::ThreadTaskRunnerHandle::Get()->PostTask(
+      base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
           FROM_HERE, base::BindOnce(&SpdyProxyClientSocket::MaybeSendEndStream,
                                     weak_factory_.GetWeakPtr()));
     }
@@ -515,7 +514,7 @@
 
   // Proxy write callbacks result in deep callback chains. Post to allow the
   // stream's write callback chain to unwind (see crbug.com/355511).
-  base::ThreadTaskRunnerHandle::Get()->PostTask(
+  base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
       FROM_HERE, base::BindOnce(&SpdyProxyClientSocket::RunWriteCallback,
                                 write_callback_weak_factory_.GetWeakPtr(),
                                 std::move(write_callback_), rv));