Fix crash in SpdyStream::SetPriority.

When a ConnectJob is assigned to a request in the socket pool, there is
often some reassignment of ConnectJobs to stream requests. This can
result in reprioritizing ConnectJobs. If one of those ConnectJobs was
using a SpdyProxyClientSocket that is using a torn down SpdySession,
trying to change its priority would result in a null dereference.

This CL makes reprioritizing SpdyProxyClientSockets and
QuicProxyClientSockets do nothing, as the reprioritizations in this
stage are often superfluous, and doesn't really get us much in either
case.

In followup CLs, I both want to remove the unnecessary reprioritizations
and use a fixed priority of all H2/QUIC tunnels.

Bug: 940848
Change-Id: I7c646b1bfcb18977dc2837c73f7b05172d6f908d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1521279
Commit-Queue: Ryan Hamilton <[email protected]>
Reviewed-by: Ryan Hamilton <[email protected]>
Cr-Commit-Position: refs/heads/master@{#640936}
diff --git a/net/spdy/spdy_proxy_client_socket.cc b/net/spdy/spdy_proxy_client_socket.cc
index e25c7be..c64dcb3 100644
--- a/net/spdy/spdy_proxy_client_socket.cc
+++ b/net/spdy/spdy_proxy_client_socket.cc
@@ -91,9 +91,13 @@
   return spdy_stream_->GetNegotiatedProtocol();
 }
 
-void SpdyProxyClientSocket::SetStreamPriority(RequestPriority priority) {
-  spdy_stream_->SetPriority(priority);
-}
+// Ignore priority changes, just use priority of initial request. Since multiple
+// requests are pooled on the SpdyProxyClientSocket, reprioritization doesn't
+// really work.
+//
+// TODO(mmenke):  Use a single priority value for all SpdyProxyClientSockets,
+// regardless of what priority they're created with.
+void SpdyProxyClientSocket::SetStreamPriority(RequestPriority priority) {}
 
 // Sends a HEADERS frame to the proxy with a CONNECT request
 // for the specified endpoint.  Waits for the server to send back