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

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: Addressed bengr comments 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 7a8e9f4c9154f8d0e2dce7ad440516dc6b601b51..4ab59cab72aada78649a5f6d794e13abdc5cd783 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_params.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_params.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "net/base/host_port_pair.h"
+#include "net/proxy/proxy_retry_info.h"
bengr 2014/07/21 22:23:57 You should be able to forward declare ProxyRetryIn
#include "url/gurl.h"
namespace net {
@@ -92,6 +93,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* delay_seconds) const;
bengr 2014/07/21 22:23:57 add: namespace base { class TimeDelta; }
megjablon 2014/07/22 02:11:30 Done.
+
+ // 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 ssl,
+ base::TimeDelta* delay_second) const;
+
// Returns the data reduction proxy primary origin.
const GURL& origin() const {
return origin_;
@@ -201,6 +221,11 @@ class DataReductionProxyParams {
bool configured_on_command_line_;
+ bool ArePrimaryAndFallbackBypassed(const net::ProxyRetryInfoMap& retry_map,
bengr 2014/07/21 22:23:57 Move this up to before the member variables. Add a
megjablon 2014/07/22 02:11:30 Done.
+ const GURL& primary,
+ const GURL& fallback,
+ base::TimeDelta* delay_seconds) const;
+
DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams);
};

Powered by Google App Engine
This is Rietveld 408576698