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

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

Issue 806053003: Set the Flywheel promo rate for Android One devices to be 100%. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting nits Created 5 years, 11 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.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),

Powered by Google App Engine
This is Rietveld 408576698