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

Unified Diff: net/proxy/proxy_service.h

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 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/proxy/proxy_service.h
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 36b4589f55be4a6ed0d21a899e6745596c5a2272..7d4d67416137600adf90fcc9987ca5dbf237c51b 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -142,6 +142,7 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
//
// Profiling information for the request is saved to |net_log| if non-NULL.
int ReconsiderProxyAfterError(const GURL& url,
+ int net_error,
mef 2014/05/28 15:39:57 please add comment in regards to usage of |net_err
bengr 2014/05/29 16:09:48 Done.
ProxyInfo* results,
const CompletionCallback& callback,
PacRequest** pac_request,
@@ -286,6 +287,9 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// Bypass the proxy because responses appear not to be coming via it.
MISSING_VIA_HEADER,
+ // Bypass the proxy because the proxy, not the origin, sent a 4xx response.
+ PROXY_4XX_BYPASS,
+
// This must always be last.
BYPASS_EVENT_TYPE_MAX
};
@@ -296,6 +300,13 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
bool is_primary,
const ProxyServer& proxy_server,
DataReductionProxyBypassEventType bypass_type) const;
+
+ // Records a net error code that resulted in bypassing the data reduction
+ // proxy (|is_primary| is true) or the data reduction proxy fallback.
+ void RecordDataReductionProxyBypassOnNetworkError(
+ bool is_primary,
+ const ProxyServer& proxy_server,
+ int net_error);
#endif
private:
@@ -458,6 +469,7 @@ class NET_EXPORT SyncProxyServiceHelper
ProxyInfo* proxy_info,
const BoundNetLog& net_log);
int ReconsiderProxyAfterError(const GURL& url,
+ int net_error,
ProxyInfo* proxy_info,
const BoundNetLog& net_log);
@@ -467,7 +479,9 @@ class NET_EXPORT SyncProxyServiceHelper
virtual ~SyncProxyServiceHelper();
void StartAsyncResolve(const GURL& url, const BoundNetLog& net_log);
- void StartAsyncReconsider(const GURL& url, const BoundNetLog& net_log);
+ void StartAsyncReconsider(const GURL& url,
+ int net_error,
+ const BoundNetLog& net_log);
void OnCompletion(int result);

Powered by Google App Engine
This is Rietveld 408576698