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

Side by Side 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: Fixed WereDataReductionProxiesBypassed 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // bypassed, if one exists. |proxy_servers| can be NULL if the caller isn't 85 // bypassed, if one exists. |proxy_servers| can be NULL if the caller isn't
86 // interested in its values. Virtual for testing. 86 // interested in its values. Virtual for testing.
87 virtual bool IsDataReductionProxy(const net::HostPortPair& host_port_pair, 87 virtual bool IsDataReductionProxy(const net::HostPortPair& host_port_pair,
88 std::pair<GURL, GURL>* proxy_servers) const; 88 std::pair<GURL, GURL>* proxy_servers) const;
89 89
90 // Returns true if this request will be sent through the data request proxy 90 // Returns true if this request will be sent through the data request proxy
91 // based on applying the param rules to the URL. We do not check bad proxy 91 // based on applying the param rules to the URL. We do not check bad proxy
92 // list. 92 // list.
93 virtual bool IsDataReductionProxyEligible(const net::URLRequest* request); 93 virtual bool IsDataReductionProxyEligible(const net::URLRequest* request);
94 94
95 // Checks if all configured data reduction proxies are in the retry map.
96 // Returns true if the request is bypassed by all configured data reduction
97 // proxies. If there are no configured data reduction proxies, returns false.
98 // It returns the bypass delay in delay_seconds (if not NULL). If
99 // the request is bypassed by more than one proxy, delay_seconds returns
100 // shortest delay.
101 bool WereDataReductionProxiesBypassed(const net::URLRequest* request,
102 int64* delay_seconds) const;
103
95 // Returns the data reduction proxy primary origin. 104 // Returns the data reduction proxy primary origin.
96 const GURL& origin() const { 105 const GURL& origin() const {
97 return origin_; 106 return origin_;
98 } 107 }
99 108
100 // Returns the data reduction proxy fallback origin. 109 // Returns the data reduction proxy fallback origin.
101 const GURL& fallback_origin() const { 110 const GURL& fallback_origin() const {
102 return fallback_origin_; 111 return fallback_origin_;
103 } 112 }
104 113
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool alt_allowed_; 208 bool alt_allowed_;
200 const bool promo_allowed_; 209 const bool promo_allowed_;
201 210
202 bool configured_on_command_line_; 211 bool configured_on_command_line_;
203 212
204 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams); 213 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams);
205 }; 214 };
206 215
207 } // namespace data_reduction_proxy 216 } // namespace data_reduction_proxy
208 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H _ 217 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698