summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/http/http_network_transaction.cc6
-rw-r--r--net/http/http_util.cc9
-rw-r--r--net/http/http_util.h5
3 files changed, 5 insertions, 15 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 6dd62fd..0b570cc 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -37,6 +37,7 @@
#include "net/http/http_proxy_client_socket_pool.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_request_info.h"
+#include "net/http/http_response_body_drainer.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
#include "net/http/http_stream_request.h"
@@ -188,7 +189,10 @@ HttpNetworkTransaction::~HttpNetworkTransaction() {
// HTTP, it can vary depending on whether or not we're pipelining. It's
// stream dependent, so the different subtypes should be implementing
// their solutions.
- HttpUtil::DrainStreamBodyAndClose(stream_.release());
+ HttpResponseBodyDrainer* drainer =
+ new HttpResponseBodyDrainer(stream_.release());
+ drainer->Start();
+ // |drainer| will delete itself.
}
}
}
diff --git a/net/http/http_util.cc b/net/http/http_util.cc
index 4b52cc3..a559c06 100644
--- a/net/http/http_util.cc
+++ b/net/http/http_util.cc
@@ -14,10 +14,7 @@
#include "base/string_number_conversions.h"
#include "base/string_piece.h"
#include "base/string_util.h"
-#include "net/base/net_errors.h"
#include "net/base/net_util.h"
-#include "net/http/http_response_body_drainer.h"
-#include "net/http/http_stream.h"
using std::string;
@@ -699,10 +696,4 @@ bool HttpUtil::ValuesIterator::GetNext() {
return false;
}
-void HttpUtil::DrainStreamBodyAndClose(HttpStream* stream) {
- HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(stream);
- drainer->Start();
- // |drainer| will delete itself.
-}
-
} // namespace net
diff --git a/net/http/http_util.h b/net/http/http_util.h
index 3179782..6daf173 100644
--- a/net/http/http_util.h
+++ b/net/http/http_util.h
@@ -10,7 +10,6 @@
#include "base/string_tokenizer.h"
#include "googleurl/src/gurl.h"
-#include "net/base/completion_callback.h"
#include "net/http/http_byte_range.h"
// This is a macro to support extending this string literal at compile time.
@@ -250,10 +249,6 @@ class HttpUtil {
std::string::const_iterator value_begin_;
std::string::const_iterator value_end_;
};
-
- // Attempts to read all of the response body of |stream|. Closes |stream| and
- // deletes it when complete.
- static void DrainStreamBodyAndClose(HttpStream* stream);
};
} // namespace net