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

Unified Diff: net/http/http_network_transaction.cc

Issue 298883011: Record errors that trigger a data reduction proxy bypass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments from mef Created 6 years, 7 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.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index d9397e4cfbc30dd4f8eab5fb3cf1e5233b277590..7783aeecc7ccd0780accd84cad7bafb395e1886a 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1009,6 +1009,14 @@ int HttpNetworkTransaction::DoReadHeadersComplete(int result) {
= response_.headers->GetDataReductionProxyBypassEventType(
&data_reduction_proxy_info);
if (proxy_bypass_event < ProxyService::BYPASS_EVENT_TYPE_MAX) {
+ // Bypass all proxies for one second on reception of a 4xx that
+ // originated at the proxy.
+ if (proxy_bypass_event == ProxyService::PROXY_4XX_BYPASS) {
+ data_reduction_proxy_info.bypass_all = true;
+ data_reduction_proxy_info.bypass_duration =
+ base::TimeDelta::FromSeconds(1);
+ }
+
ProxyService* proxy_service = session_->proxy_service();
proxy_service->RecordDataReductionProxyBypassInfo(

Powered by Google App Engine
This is Rietveld 408576698