summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_service.h
diff options
context:
space:
mode:
authorbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 15:08:42 +0000
committerbengr@chromium.org <bengr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-30 15:08:42 +0000
commitecc7b1678ed1f52b056c94c41d9f3009de1cdc9c (patch)
treeab10d1ab97741afca1682e990c45cb479dde293f /net/proxy/proxy_service.h
parentaabf821311666fcc6ce0eccb94251433f75df7a8 (diff)
downloadchromium_src-ecc7b1678ed1f52b056c94c41d9f3009de1cdc9c.zip
chromium_src-ecc7b1678ed1f52b056c94c41d9f3009de1cdc9c.tar.gz
chromium_src-ecc7b1678ed1f52b056c94c41d9f3009de1cdc9c.tar.bz2
Update UMA to track bypasses due to 4xx responses that are missing the proxy's via header and bypasses due to network errors.
BUG=376148 Review URL: https://codereview.chromium.org/298883011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273839 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_service.h')
-rw-r--r--net/proxy/proxy_service.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 36b4589..6f85568 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -132,8 +132,10 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// This method is called after a failure to connect or resolve a host name.
// It gives the proxy service an opportunity to reconsider the proxy to use.
// The |results| parameter contains the results returned by an earlier call
- // to ResolveProxy. The semantics of this call are otherwise similar to
- // ResolveProxy.
+ // to ResolveProxy. The |net_error| parameter contains the network error
+ // code associated with the failure. See "net/base/net_error_list.h" for a
+ // list of possible values. The semantics of this call are otherwise
+ // similar to ResolveProxy.
//
// NULL can be passed for |pac_request| if the caller will not need to
// cancel the request.
@@ -142,6 +144,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,
ProxyInfo* results,
const CompletionCallback& callback,
PacRequest** pac_request,
@@ -286,6 +289,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 +302,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 +471,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 +481,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);