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

Unified Diff: net/http/http_network_transaction.h

Issue 137493008: Retry HttpNetworkTransactions upon receipt of ERR_NETWORK_CHANGED during host resolution and … Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Flush task queue before restart Created 6 years, 11 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 | « no previous file | net/http/http_network_transaction.cc » ('j') | net/url_request/url_fetcher_core.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.h
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 596fb7edf87911c41a8e695df5c8bd1ed4b9ff45..956bcb42b8e7d97a441be0149055b1804b02c8ac 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -11,6 +11,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "net/base/net_log.h"
#include "net/base/request_priority.h"
@@ -339,6 +340,15 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
BeforeNetworkStartCallback before_network_start_callback_;
+ // How many times have we automatically retried this request after failing
+ // with ERR_NETWORK_CHANGED. Retrying is only attempted when
+ // ERR_NETWORK_CHANGED is received during host resolution or connecting
+ // (i.e. before the request has been issued). This ensures request
+ // side-effects are never duplicated.
+ int num_automatic_retries_on_network_changes_;
+
+ base::WeakPtrFactory<HttpNetworkTransaction> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction);
};
« no previous file with comments | « no previous file | net/http/http_network_transaction.cc » ('j') | net/url_request/url_fetcher_core.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698