| Index: components/variations/study_filtering.cc
|
| diff --git a/components/variations/study_filtering.cc b/components/variations/study_filtering.cc
|
| index e7ccd25888f272b6ad9d4946c33943e3b2c243ff..97d43905d8b8649549f78c0af04a394755359823 100644
|
| --- a/components/variations/study_filtering.cc
|
| +++ b/components/variations/study_filtering.cc
|
| @@ -116,6 +116,12 @@ bool CheckStudyPlatform(const Study::Filter& filter, Study::Platform platform) {
|
| return false;
|
| }
|
|
|
| +bool CheckStudyLowEndDevice(const Study::Filter& filter,
|
| + bool is_low_end_device) {
|
| + return !filter.has_is_low_end_device() ||
|
| + filter.is_low_end_device() == is_low_end_device;
|
| +}
|
| +
|
| bool CheckStudyStartDate(const Study::Filter& filter,
|
| const base::Time& date_time) {
|
| if (filter.has_start_date()) {
|
| @@ -245,6 +251,13 @@ bool ShouldAddStudy(const Study& study,
|
| return false;
|
| }
|
|
|
| + if (!CheckStudyLowEndDevice(study.filter(),
|
| + client_state.is_low_end_device)) {
|
| + DVLOG(1) << "Filtered out study " << study.name()
|
| + << " due to is_low_end_device.";
|
| + return false;
|
| + }
|
| +
|
| const std::string& country = GetClientCountryForStudy(study, client_state);
|
| if (!CheckStudyCountry(study.filter(), country)) {
|
| DVLOG(1) << "Filtered out study " << study.name() << " due to country.";
|
|
|