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

Unified Diff: net/proxy/proxy_service.h

Issue 307223004: Merge 273839 "Update UMA to track bypasses due to 4xx responses ..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985/src/
Patch Set: 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
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service.h
===================================================================
--- net/proxy/proxy_service.h (revision 274257)
+++ net/proxy/proxy_service.h (working copy)
@@ -132,8 +132,10 @@
// 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 @@
//
// 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 @@
// 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 @@
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 @@
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 @@
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);
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698