| OLD | NEW |
| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static bool IsIncludedInAlternativeFieldTrial(); | 42 static bool IsIncludedInAlternativeFieldTrial(); |
| 43 | 43 |
| 44 // Returns true if this client is part of the field trial that should display | 44 // Returns true if this client is part of the field trial that should display |
| 45 // a promotion for the data reduction proxy. | 45 // a promotion for the data reduction proxy. |
| 46 static bool IsIncludedInPromoFieldTrial(); | 46 static bool IsIncludedInPromoFieldTrial(); |
| 47 | 47 |
| 48 // Returns true if this client is part of a field trial that uses preconnect | 48 // Returns true if this client is part of a field trial that uses preconnect |
| 49 // hinting. | 49 // hinting. |
| 50 static bool IsIncludedInPreconnectHintingFieldTrial(); | 50 static bool IsIncludedInPreconnectHintingFieldTrial(); |
| 51 | 51 |
| 52 // Returns true if this client is part of a field trial that bypasses the |
| 53 // proxy if the request resource type is on the critical path (e.g. HTML). |
| 54 static bool IsIncludedInCriticalPathBypassFieldTrial(); |
| 55 |
| 52 // Returns true if the authentication key was set on the command line. | 56 // Returns true if the authentication key was set on the command line. |
| 53 static bool IsKeySetOnCommandLine(); | 57 static bool IsKeySetOnCommandLine(); |
| 54 | 58 |
| 55 // Constructs configuration parameters. If |kAllowed|, then the standard | 59 // Constructs configuration parameters. If |kAllowed|, then the standard |
| 56 // data reduction proxy configuration is allowed to be used. If | 60 // data reduction proxy configuration is allowed to be used. If |
| 57 // |kfallbackAllowed| a fallback proxy can be used if the primary proxy is | 61 // |kfallbackAllowed| a fallback proxy can be used if the primary proxy is |
| 58 // bypassed or disabled. If |kAlternativeAllowed| then an alternative proxy | 62 // bypassed or disabled. If |kAlternativeAllowed| then an alternative proxy |
| 59 // configuration is allowed to be used. This alternative configuration would | 63 // configuration is allowed to be used. This alternative configuration would |
| 60 // replace the primary and fallback proxy configurations if enabled. Finally | 64 // replace the primary and fallback proxy configurations if enabled. Finally |
| 61 // if |kPromoAllowed|, the client may show a promotion for the data reduction | 65 // if |kPromoAllowed|, the client may show a promotion for the data reduction |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 bool allowed_; | 205 bool allowed_; |
| 202 const bool fallback_allowed_; | 206 const bool fallback_allowed_; |
| 203 bool alt_allowed_; | 207 bool alt_allowed_; |
| 204 const bool promo_allowed_; | 208 const bool promo_allowed_; |
| 205 | 209 |
| 206 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams); | 210 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyParams); |
| 207 }; | 211 }; |
| 208 | 212 |
| 209 } // namespace data_reduction_proxy | 213 } // namespace data_reduction_proxy |
| 210 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H
_ | 214 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PARAMS_H
_ |
| OLD | NEW |