Index: components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc |
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc |
index ff71eefe2260dd275c829fdd1f4ded2dd79bb525..aac5182d767e3082b80343cf6e2105529a93453d 100644 |
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc |
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc |
@@ -9,6 +9,7 @@ |
#include "base/command_line.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/metrics/field_trial.h" |
+#include "base/strings/string_piece.h" |
#include "base/time/time.h" |
#include "base/values.h" |
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h" |
@@ -41,6 +42,7 @@ const char kDefaultAltFallbackOrigin[] = "http://ssl.googlezip.net:80/"; |
const char kDefaultProbeUrl[] = "http://check.googlezip.net/connect"; |
const char kDefaultWarmupUrl[] = "http://www.gstatic.com/generate_204"; |
+const char kAndroidOneIdentifier[] = "sprout"; |
} // namespace |
namespace data_reduction_proxy { |
@@ -81,6 +83,13 @@ bool DataReductionProxyParams:: |
"DataReductionProxyRemoveMissingViaHeaderOtherBypass") == kEnabled; |
} |
+// static |
+bool DataReductionProxyParams::IsIncludedInAndroidOnePromoFieldTrial( |
+ const char* build_fingerprint) { |
+ base::StringPiece fingerprint(build_fingerprint); |
+ return (fingerprint.find(kAndroidOneIdentifier) != std::string::npos); |
+} |
+ |
DataReductionProxyTypeInfo::DataReductionProxyTypeInfo() |
: proxy_servers(), |
is_fallback(false), |