Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: net/http/http_cache_transaction.cc

Issue 1006643002: Plumb connection attempts from (non-proxy) ConnectJobs to HttpNetworkTransaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 83fea07d93aa80bef7b901b0e854223586d7109d..fc6b68ec907fd84f1738c112a7b2842ab28958a3 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -651,6 +651,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) {
@@ -2844,6 +2855,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);
network_trans_.reset();
}
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698