Chromium Code Reviews| Index: net/http/http_cache_transaction.cc |
| diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc |
| index 24de37ab5e571309c53dfe1dddd8e18a107a454c..bb804c33ae2b532401948e0cc3c19af27b0c940c 100644 |
| --- a/net/http/http_cache_transaction.cc |
| +++ b/net/http/http_cache_transaction.cc |
| @@ -695,6 +695,17 @@ int HttpCache::Transaction::ResumeNetworkStart() { |
| return ERR_UNEXPECTED; |
| } |
| +void HttpCache::Transaction::GetConnectionAttempts( |
| + ConnectionAttempts* out) const { |
| + ConnectionAttempts new_connection_attempts; |
| + if (network_trans_) |
| + network_trans_->GetConnectionAttempts(&new_connection_attempts); |
| + |
| + out->swap(new_connection_attempts); |
| + out->insert(out->begin(), old_connection_attempts_.begin(), |
| + old_connection_attempts_.end()); |
| +} |
| + |
| //----------------------------------------------------------------------------- |
| void HttpCache::Transaction::DoCallback(int rv) { |
| @@ -2911,6 +2922,10 @@ void HttpCache::Transaction::ResetNetworkTransaction() { |
| if (network_trans_->GetLoadTimingInfo(&load_timing)) |
| old_network_trans_load_timing_.reset(new LoadTimingInfo(load_timing)); |
| total_received_bytes_ += network_trans_->GetTotalReceivedBytes(); |
| + ConnectionAttempts attempts; |
| + network_trans_->GetConnectionAttempts(&attempts); |
| + for (const auto& attempt : attempts) |
| + old_connection_attempts_.push_back(attempt); |
|
Randy Smith (Not in Mondays)
2015/04/27 17:53:06
I find myself wondering if it might make sense to
|
| network_trans_.reset(); |
| } |