Replace GetWeakPtr() with GetMutableWeakPtr() in /net/spdy

This CL replaces uses of GetWeakPtr() with GetMutableWeakPtr() in places
that expect a WeakPtr<T> while in a const T context. This helps make the
const -> non-const transition more explicit.

This CL was uploaded by git cl split.

[email protected]

Bug: 1366168
Change-Id: If0da439471ce983686673a2e2d1f09aa8ad04448
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3936136
Reviewed-by: Ryan Hamilton <[email protected]>
Commit-Queue: Ryan Hamilton <[email protected]>
Auto-Submit: Alan Cutter <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1055989}
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index 2e4d0a31..5984eced 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -285,7 +285,7 @@
   if (end_stream_state_ == EndStreamState::kEndStreamReceived) {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE, base::BindOnce(&SpdyProxyClientSocket::MaybeSendEndStream,
-                                  weak_factory_.GetWeakPtr()));
+                                  weak_factory_.GetMutableWeakPtr()));
   }
 }