| Index: net/url_request/url_request_http_job.cc
|
| diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
|
| index c9aa4cc2ed326c6518658e1a01917401f97711cf..982971edbcd7c397c66e6c0524da4fee314edab6 100644
|
| --- a/net/url_request/url_request_http_job.cc
|
| +++ b/net/url_request/url_request_http_job.cc
|
| @@ -197,6 +197,7 @@ URLRequestHttpJob::URLRequestHttpJob(
|
| awaiting_callback_(false),
|
| http_user_agent_settings_(http_user_agent_settings),
|
| backoff_manager_(request->context()->backoff_manager()),
|
| + total_received_bytes_from_previous_transactions_(0),
|
| weak_factory_(this) {
|
| URLRequestThrottlerManager* manager = request->context()->throttler_manager();
|
| if (manager)
|
| @@ -421,6 +422,9 @@ void URLRequestHttpJob::DestroyTransaction() {
|
| DCHECK(transaction_.get());
|
|
|
| DoneWithRequest(ABORTED);
|
| +
|
| + total_received_bytes_from_previous_transactions_ +=
|
| + transaction_->GetTotalReceivedBytes();
|
| transaction_.reset();
|
| response_info_ = NULL;
|
| receive_headers_end_ = base::TimeTicks();
|
| @@ -1359,10 +1363,11 @@ bool URLRequestHttpJob::GetFullRequestHeaders(
|
| }
|
|
|
| int64 URLRequestHttpJob::GetTotalReceivedBytes() const {
|
| - if (!transaction_)
|
| - return 0;
|
| -
|
| - return transaction_->GetTotalReceivedBytes();
|
| + int64_t total_received_bytes =
|
| + total_received_bytes_from_previous_transactions_;
|
| + if (transaction_)
|
| + total_received_bytes += transaction_->GetTotalReceivedBytes();
|
| + return total_received_bytes;
|
| }
|
|
|
| void URLRequestHttpJob::DoneReading() {
|
|
|