Remove HttpStreamBase.

HttpStreamBase was introduced to integrate the connection setup logic between
HTTP and WebSocket[1] by abstracting methods from HttpStream, but it is not
needed now. In addition to that, there is a downcast from HttpStreamBase to
HttpStream and that leads to a crash.

This CL moves all methods in HttpStreamBase to HttpStream and removes
HttpStreamBase.
This CL also replaces NULL with nullptr in some files.

1: https://chromium.googlesource.com/chromium/src/+/92b9a3e000136518c489975bebea57bc0f66333f
BUG=399535

Review URL: https://codereview.chromium.org/699123002

Cr-Commit-Position: refs/heads/master@{#302967}
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index d29342e..eea7294 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -45,7 +45,7 @@
 #include "net/http/http_response_info.h"
 #include "net/http/http_server_properties.h"
 #include "net/http/http_status_code.h"
-#include "net/http/http_stream_base.h"
+#include "net/http/http_stream.h"
 #include "net/http/http_stream_factory.h"
 #include "net/http/http_util.h"
 #include "net/http/transport_security_state.h"
@@ -163,7 +163,7 @@
         stream_->Close(true /* not reusable */);
       } else {
         // Otherwise, we try to drain the response body.
-        HttpStreamBase* stream = stream_.release();
+        HttpStream* stream = stream_.release();
         stream->Drain(session_);
       }
     }
@@ -305,8 +305,7 @@
       // We should call connection_->set_idle_time(), but this doesn't occur
       // often enough to be worth the trouble.
       stream_->SetConnectionReused();
-      new_stream =
-          static_cast<HttpStream*>(stream_.get())->RenewStreamForAuth();
+      new_stream = stream_->RenewStreamForAuth();
     }
 
     if (!new_stream) {
@@ -421,8 +420,7 @@
   if (!stream_.get())
     return UploadProgress();
 
-  // TODO(bashi): This cast is temporary. Remove later.
-  return static_cast<HttpStream*>(stream_.get())->GetUploadProgress();
+  return stream_->GetUploadProgress();
 }
 
 void HttpNetworkTransaction::SetQuicServerInfo(
@@ -471,7 +469,7 @@
 
 void HttpNetworkTransaction::OnStreamReady(const SSLConfig& used_ssl_config,
                                            const ProxyInfo& used_proxy_info,
-                                           HttpStreamBase* stream) {
+                                           HttpStream* stream) {
   DCHECK_EQ(STATE_CREATE_STREAM_COMPLETE, next_state_);
   DCHECK(stream_request_.get());
 
@@ -564,7 +562,7 @@
     const HttpResponseInfo& response_info,
     const SSLConfig& used_ssl_config,
     const ProxyInfo& used_proxy_info,
-    HttpStreamBase* stream) {
+    HttpStream* stream) {
   DCHECK_EQ(STATE_CREATE_STREAM_COMPLETE, next_state_);
 
   headers_valid_ = true;