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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params.h

Issue 2922663002: Data Reduction Proxy: Remove duplicate functions (Closed)
Patch Set: megjablon comments Created 3 years, 6 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/core/common/data_reduction_proxy_params.h
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h
index 9bbf6fd5a395bfae5738d7b6a053d0bbfe565812..c78c519992d1017726aa7b86fa3cd83030e0a693 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.h
@@ -46,8 +46,10 @@ const char* GetTrustedSpdyProxyFieldTrialName();
bool IsIncludedInTrustedSpdyProxyFieldTrial();
// Returns true if this client is part of the field trial that should display
-// a promotion for the data reduction proxy on Android One devices.
-bool IsIncludedInAndroidOnePromoFieldTrial(base::StringPiece build_fingerprint);
+// a promotion for the data reduction proxy on Android One devices. This is for
+// testing purposes and should not be called outside of tests.
+bool IsIncludedInAndroidOnePromoFieldTrialForTesting(
+ base::StringPiece build_fingerprint);
// Returns the name of the Lo-Fi field trial.
const char* GetLoFiFieldTrialName();
@@ -186,17 +188,9 @@ struct DataReductionProxyTypeInfo {
// Reduction Proxy.
class DataReductionProxyParams : public DataReductionProxyConfigValues {
public:
- // Flags used during construction that specify if the promotion is allowed to
- // be shown, and if this instance is part of a holdback experiment.
- static const unsigned int kPromoAllowed = (1 << 2);
- static const unsigned int kHoldback = (1 << 3);
-
- // Constructs configuration parameters. If |kPromoAllowed|, the client may
- // show a promotion for the data reduction proxy.
- //
- // A standard configuration has a primary proxy, and a fallback proxy for
- // HTTP traffic.
- explicit DataReductionProxyParams(int flags);
+ // Constructs configuration parameters. A standard configuration has a primary
+ // proxy, and a fallback proxy for HTTP traffic.
+ DataReductionProxyParams();
// Updates |proxies_for_http_|.
void SetProxiesForHttpForTesting(
@@ -209,14 +203,9 @@ class DataReductionProxyParams : public DataReductionProxyConfigValues {
const GURL& secure_proxy_check_url() const override;
- bool promo_allowed() const override;
-
- bool holdback() const override;
-
protected:
// Test constructor that optionally won't call Init();
- DataReductionProxyParams(int flags,
- bool should_call_init);
+ explicit DataReductionProxyParams(bool should_call_init);
// Initialize the values of the proxies, and secure proxy check URL, from
// command line flags and preprocessor constants, and check that there are
@@ -241,9 +230,6 @@ class DataReductionProxyParams : public DataReductionProxyConfigValues {
GURL secure_proxy_check_url_;
- bool promo_allowed_;
- bool holdback_;
-
bool use_override_proxies_for_http_;
std::vector<DataReductionProxyServer> override_data_reduction_proxy_servers_;

Powered by Google App Engine
This is Rietveld 408576698