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

Unified Diff: net/http/http_network_transaction.h

Issue 403393003: HTTP retry support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
Index: net/http/http_network_transaction.h
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 895ecc3d17af64fb6b8ade42ce7e2324a824aca1..7d913ab124ad055b67ea1ddf6b138062bef8e0aa 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -190,6 +190,9 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
// Record histogram of latency (durations until last byte received).
void LogTransactionMetrics() const;
+ // Record histogram of retry attempt success rate.
+ void LogTransactionRetryMetrics(int error) const;
+
// Writes a log message to help debugging in the field when we block a proxy
// response to a CONNECT request.
void LogBlockedTunnelResponse(int response_code) const;
@@ -316,6 +319,25 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
// Total number of bytes received on streams for this transaction.
int64 total_received_bytes_;
+ // Total number of retries for this transaction.
+ int retry_attempt_;
+
+ // How much data was read from a response body before retrying a transaction.
+ int64 offset_;
+
+ // Previous content length, used for retry.
+ int64 previous_content_length_;
+
+ // Previous etag, used for retry.
+ std::string previous_etag_;
+
+ // Previous last modified, used for retry.
+ std::string previous_last_modified_;
+
+ // Hash of previous request attempt for cross-checking when retrying without
+ // range support.
+ uint8 hash_[8];
+
// The time the Start method was called.
base::Time start_time_;

Powered by Google App Engine
This is Rietveld 408576698