X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcomponents%2Fdata_reduction_proxy%2Fbrowser%2Fdata_reduction_proxy_params.h;h=174d6983050679e9ddfc4e5aff505e2931c9d041;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=e961246e8acffc0cc82cb4f9575d786fe1c488fe;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/components/data_reduction_proxy/browser/data_reduction_proxy_params.h b/src/components/data_reduction_proxy/browser/data_reduction_proxy_params.h index e961246..174d698 100644 --- a/src/components/data_reduction_proxy/browser/data_reduction_proxy_params.h +++ b/src/components/data_reduction_proxy/browser/data_reduction_proxy_params.h @@ -51,15 +51,12 @@ class DataReductionProxyParams { static const unsigned int kAllowed = (1 << 0); static const unsigned int kFallbackAllowed = (1 << 1); static const unsigned int kAlternativeAllowed = (1 << 2); - static const unsigned int kPromoAllowed = (1 << 3); - static const unsigned int kHoldback = (1 << 4); + static const unsigned int kAlternativeFallbackAllowed = (1 << 3); + static const unsigned int kPromoAllowed = (1 << 4); + static const unsigned int kHoldback = (1 << 5); typedef std::vector DataReductionProxyList; - // Returns true if this client is part of the data reduction proxy field - // trial. - static bool IsIncludedInFieldTrial(); - // Returns true if this client is part of field trial to use an alternative // configuration for the data reduction proxy. static bool IsIncludedInAlternativeFieldTrial(); @@ -83,6 +80,13 @@ class DataReductionProxyParams { // is in effect. static bool IsIncludedInHoldbackFieldTrial(); + // Returns true if this client is part of a field trial that removes the + // |MISSING_VIA_HEADER_OTHER| proxy bypass case. This experiment changes proxy + // bypass logic to not trigger a proxy bypass when a response with a non-4xx + // response code is expected to have a data reduction proxy via header, but + // the data reduction proxy via header is missing. + static bool IsIncludedInRemoveMissingViaHeaderOtherBypassFieldTrial(); + // Constructs configuration parameters. If |kAllowed|, then the standard // data reduction proxy configuration is allowed to be used. If // |kfallbackAllowed| a fallback proxy can be used if the primary proxy is @@ -204,6 +208,12 @@ class DataReductionProxyParams { return alt_allowed_; } + // Returns true if the alternative fallback data reduction proxy + // configuration may be used. + bool alternative_fallback_allowed() const { + return alt_fallback_allowed_; + } + // Returns true if the data reduction proxy promo may be shown. // This is idependent of whether the data reduction proxy is allowed. // TODO(bengr): maybe tie to whether proxy is allowed. @@ -236,7 +246,10 @@ class DataReductionProxyParams { // Initialize the values of the proxies, and probe URL, from command // line flags and preprocessor constants, and check that there are // corresponding definitions for the allowed configurations. - bool Init(bool allowed, bool fallback_allowed, bool alt_allowed); + bool Init(bool allowed, + bool fallback_allowed, + bool alt_allowed, + bool alt_fallback_allowed); // Initialize the values of the proxies, and probe URL from command // line flags and preprocessor constants. @@ -245,6 +258,7 @@ class DataReductionProxyParams { // Returns the corresponding string from preprocessor constants if defined, // and an empty string otherwise. virtual std::string GetDefaultDevOrigin() const; + virtual std::string GetDefaultDevFallbackOrigin() const; virtual std::string GetDefaultOrigin() const; virtual std::string GetDefaultFallbackOrigin() const; virtual std::string GetDefaultSSLOrigin() const; @@ -277,6 +291,7 @@ class DataReductionProxyParams { bool allowed_; bool fallback_allowed_; bool alt_allowed_; + bool alt_fallback_allowed_; bool promo_allowed_; bool holdback_;