OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ | 5 #ifndef CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ |
6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ | 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // Returns true if a screen promoting the data reduction proxy is allowed to | 118 // Returns true if a screen promoting the data reduction proxy is allowed to |
119 // be shown. Logic that decides when to show the promo should check its | 119 // be shown. Logic that decides when to show the promo should check its |
120 // availability. This would return false if not part of a separate field | 120 // availability. This would return false if not part of a separate field |
121 // trial that governs the use of the promotion. | 121 // trial that governs the use of the promotion. |
122 static bool IsDataReductionProxyPromoAllowed(); | 122 static bool IsDataReductionProxyPromoAllowed(); |
123 | 123 |
124 // Returns true if preconnect advisory hinting is enabled by command line | 124 // Returns true if preconnect advisory hinting is enabled by command line |
125 // flag or Finch trial. | 125 // flag or Finch trial. |
126 static bool IsPreconnectHintingAllowed(); | 126 static bool IsPreconnectHintingAllowed(); |
127 | 127 |
128 // Returns true if the Via header indicates that this request was fetched | |
129 // explicitly via the Chrome Proxy. | |
130 static bool WasFetchedViaProxy(const net::HttpResponseHeaders* headers); | |
131 | |
132 // Returns the URL of the data reduction proxy. | 128 // Returns the URL of the data reduction proxy. |
133 static std::string GetDataReductionProxyOrigin(); | 129 static std::string GetDataReductionProxyOrigin(); |
134 | 130 |
135 // Returns the URL of the fallback data reduction proxy. | 131 // Returns the URL of the fallback data reduction proxy. |
136 static std::string GetDataReductionProxyFallback(); | 132 static std::string GetDataReductionProxyFallback(); |
137 | 133 |
138 // Returns a vector of GURLs for all configured proxies. | 134 // Returns a vector of GURLs for all configured proxies. |
139 static DataReductionProxyList GetDataReductionProxies(); | 135 static DataReductionProxyList GetDataReductionProxies(); |
140 | 136 |
141 // Returns true if |auth_info| represents an authentication challenge from | 137 // Returns true if |auth_info| represents an authentication challenge from |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 bool restricted_by_carrier_; | 267 bool restricted_by_carrier_; |
272 bool enabled_by_user_; | 268 bool enabled_by_user_; |
273 | 269 |
274 scoped_ptr<net::URLFetcher> fetcher_; | 270 scoped_ptr<net::URLFetcher> fetcher_; |
275 BooleanPrefMember spdy_proxy_auth_enabled_; | 271 BooleanPrefMember spdy_proxy_auth_enabled_; |
276 | 272 |
277 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); | 273 DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); |
278 }; | 274 }; |
279 | 275 |
280 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ | 276 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROXY_SETTINGS_H_ |
OLD | NEW |