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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_params.h

Issue 510353004: Fixing DataReductionProxy.BypassedBytes.LocalBypassRules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing managed pac reporting Created 6 years, 3 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>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "net/base/host_port_pair.h" 13 #include "net/base/host_port_pair.h"
14 #include "net/proxy/proxy_retry_info.h" 14 #include "net/proxy/proxy_retry_info.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace base { 17 namespace base {
18 class TimeDelta; 18 class TimeDelta;
19 } 19 }
20 20
21 namespace net { 21 namespace net {
22 class ProxyConfig;
22 class URLRequest; 23 class URLRequest;
23 } 24 }
24 25
25 namespace data_reduction_proxy { 26 namespace data_reduction_proxy {
26 27
27 // Contains information about a given proxy server. |proxy_servers| contains 28 // Contains information about a given proxy server. |proxy_servers| contains
28 // the configured data reduction proxy servers. |is_fallback|, |is_alternative| 29 // the configured data reduction proxy servers. |is_fallback|, |is_alternative|
29 // and |is_ssl| note whether the given proxy is a fallback, an alternative, 30 // and |is_ssl| note whether the given proxy is a fallback, an alternative,
30 // or a proxy for ssl; these are not mutually exclusive. 31 // or a proxy for ssl; these are not mutually exclusive.
31 struct DataReductionProxyTypeInfo { 32 struct DataReductionProxyTypeInfo {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // if the caller isn't interested in its values. Virtual for testing. 124 // if the caller isn't interested in its values. Virtual for testing.
124 virtual bool IsDataReductionProxy( 125 virtual bool IsDataReductionProxy(
125 const net::HostPortPair& host_port_pair, 126 const net::HostPortPair& host_port_pair,
126 DataReductionProxyTypeInfo* proxy_info) const; 127 DataReductionProxyTypeInfo* proxy_info) const;
127 128
128 // Returns true if this request will be sent through the data request proxy 129 // Returns true if this request will be sent through the data request proxy
129 // based on applying the param rules to the URL. We do not check bad proxy 130 // based on applying the param rules to the URL. We do not check bad proxy
130 // list. 131 // list.
131 virtual bool IsDataReductionProxyEligible(const net::URLRequest* request); 132 virtual bool IsDataReductionProxyEligible(const net::URLRequest* request);
132 133
134 // Returns true if this request could be sent through the data request proxy
135 // based on applying the |data_reduction_proxy_config| param rules to the URL.
bengr 2014/08/29 19:29:48 to the request URL.
megjablon 2014/08/29 20:26:32 Done.
136 bool PassesDataReductionProxyLocalBypassRules(
137 const net::URLRequest& request,
138 const net::ProxyConfig& data_reduction_proxy_config);
139
133 // Checks if all configured data reduction proxies are in the retry map. 140 // Checks if all configured data reduction proxies are in the retry map.
134 // Returns true if the request is bypassed by all configured data reduction 141 // Returns true if the request is bypassed by all configured data reduction
135 // proxies and returns the bypass delay in delay_seconds (if not NULL). If 142 // proxies and returns the bypass delay in delay_seconds (if not NULL). If
136 // there are no configured data reduction proxies, returns false. If 143 // there are no configured data reduction proxies, returns false. If
137 // the request is bypassed by more than one proxy, delay_seconds returns 144 // the request is bypassed by more than one proxy, delay_seconds returns
138 // the shortest delay. 145 // the shortest delay.
139 bool AreDataReductionProxiesBypassed(const net::URLRequest& request, 146 bool AreDataReductionProxiesBypassed(const net::URLRequest& request,
140 base::TimeDelta* min_retry_delay) const; 147 base::TimeDelta* min_retry_delay) const;
141 148
142 // Checks if all configured data reduction proxies are in the retry map. 149 // Checks if all configured data reduction proxies are in the retry map.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 bool fallback_allowed_; 282 bool fallback_allowed_;
276 bool alt_allowed_; 283 bool alt_allowed_;
277 bool promo_allowed_; 284 bool promo_allowed_;
278 bool holdback_; 285 bool holdback_;
279 286
280 bool configured_on_command_line_; 287 bool configured_on_command_line_;
281 }; 288 };
282 289
283 } // namespace data_reduction_proxy 290 } // namespace data_reduction_proxy
284 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H _ 291 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698