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

Unified Diff: components/variations/service/variations_service.cc

Issue 2970093002: Add variations filtering for is_low_end_device. (Closed)
Patch Set: Address comments. Created 3 years, 5 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
« no previous file with comments | « components/variations/proto/study.proto ('k') | components/variations/study_filtering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/service/variations_service.cc
diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc
index ab3b89e5b5a1fea48e3a61d764834e5cf5d1336c..e6c32d9b0ffb93ba1983c83522972743b5a5e551 100644
--- a/components/variations/service/variations_service.cc
+++ b/components/variations/service/variations_service.cc
@@ -632,6 +632,13 @@ VariationsService::GetClientFilterableStateForVersion(
state->form_factor = GetCurrentFormFactor();
state->platform = ClientFilterableState::GetCurrentPlatform();
state->hardware_class = GetHardwareClass();
+#if defined(OS_ANDROID)
+ // This is set on Android only currently, because the IsLowEndDevice() API
+ // on other platforms has no intrinsic meaning outside of a field trial that
+ // controls its value. Since this is before server-side field trials are
+ // evaluated, that field trial would not be able to apply for this case.
+ state->is_low_end_device = base::SysInfo::IsLowEndDevice();
+#endif
state->session_consistency_country = GetLatestCountry();
state->permanent_consistency_country = LoadPermanentConsistencyCountry(
version, state->session_consistency_country);
« no previous file with comments | « components/variations/proto/study.proto ('k') | components/variations/study_filtering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698