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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_params.h

Issue 390533003: Bypassed Bytes UMAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving #if defined(SPDY_PROXY_AUTH_ORIGIN) Created 6 years, 5 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: components/data_reduction_proxy/browser/data_reduction_proxy_params.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_params.h b/components/data_reduction_proxy/browser/data_reduction_proxy_params.h
index fbcc394d0358b2bfa1e93a44a4f1be4e452c97c1..ae024b8063e2dd1515622e97a6cfda3808136eaf 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_params.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_params.h
@@ -11,8 +11,13 @@
#include "base/macros.h"
#include "net/base/host_port_pair.h"
+#include "net/proxy/proxy_retry_info.h"
#include "url/gurl.h"
+namespace base {
+class TimeDelta;
+}
+
namespace net {
class URLRequest;
}
@@ -104,6 +109,25 @@ class DataReductionProxyParams {
// list.
virtual bool IsDataReductionProxyEligible(const net::URLRequest* request);
+ // Checks if all configured data reduction proxies are in the retry map.
+ // Returns true if the request is bypassed by all configured data reduction
+ // proxies and returns the bypass delay in delay_seconds (if not NULL). If
+ // there are no configured data reduction proxies, returns false. If
+ // the request is bypassed by more than one proxy, delay_seconds returns
+ // the shortest delay.
+ bool AreDataReductionProxiesBypassed(const net::URLRequest& request,
+ base::TimeDelta* min_retry_delay) const;
+
+ // Checks if all configured data reduction proxies are in the retry map.
+ // Returns true if the request is bypassed by all configured data reduction
+ // proxies and returns the bypass delay in delay_seconds (if not NULL). If
+ // there are no configured data reduction proxies, returns false. If
+ // the request is bypassed by more than one proxy, delay_seconds returns
+ // the shortest delay.
+ bool AreProxiesBypassed(const net::ProxyRetryInfoMap& retry_map,
+ bool is_https,
+ base::TimeDelta* min_retry_delay) const;
+
// Returns the data reduction proxy primary origin.
const GURL& origin() const {
return origin_;
@@ -204,6 +228,15 @@ class DataReductionProxyParams {
virtual std::string GetDefaultWarmupURL() const;
private:
+ // Checks if the primary and fallback data reduction proxies are in the retry
+ // map. Returns true if the request is bypassed by both data reduction
+ // proxies and returns the shortest bypass delay in delay_seconds (if not
+ // NULL). If the fallback proxy is not valid, returns true if primary proxy
+ // was bypassed and returns its bypass delay.
+ bool ArePrimaryAndFallbackBypassed(const net::ProxyRetryInfoMap& retry_map,
+ const GURL& primary,
+ const GURL& fallback,
+ base::TimeDelta* min_retry_delay) const;
GURL origin_;
GURL fallback_origin_;
GURL ssl_origin_;

Powered by Google App Engine
This is Rietveld 408576698