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

Side by Side Diff: components/variations/study_filtering.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_VARIATIONS_STUDY_FILTERING_H_ 5 #ifndef COMPONENTS_VARIATIONS_STUDY_FILTERING_H_
6 #define COMPONENTS_VARIATIONS_STUDY_FILTERING_H_ 6 #define COMPONENTS_VARIATIONS_STUDY_FILTERING_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 // |filter|. 34 // |filter|.
35 bool CheckStudyHardwareClass(const Study::Filter& filter, 35 bool CheckStudyHardwareClass(const Study::Filter& filter,
36 const std::string& hardware_class); 36 const std::string& hardware_class);
37 37
38 // Checks whether a study is applicable for the given |locale| per |filter|. 38 // Checks whether a study is applicable for the given |locale| per |filter|.
39 bool CheckStudyLocale(const Study::Filter& filter, const std::string& locale); 39 bool CheckStudyLocale(const Study::Filter& filter, const std::string& locale);
40 40
41 // Checks whether a study is applicable for the given |platform| per |filter|. 41 // Checks whether a study is applicable for the given |platform| per |filter|.
42 bool CheckStudyPlatform(const Study::Filter& filter, Study::Platform platform); 42 bool CheckStudyPlatform(const Study::Filter& filter, Study::Platform platform);
43 43
44 // Checks whether a study is applicable given |is_low_end_device| per |filter|.
45 bool CheckStudyLowEndDevice(const Study::Filter& filter,
46 bool is_low_end_device);
47
44 // Checks whether a study is applicable for the given date/time per |filter|. 48 // Checks whether a study is applicable for the given date/time per |filter|.
45 bool CheckStudyStartDate(const Study::Filter& filter, 49 bool CheckStudyStartDate(const Study::Filter& filter,
46 const base::Time& date_time); 50 const base::Time& date_time);
47 51
48 // Checks whether a study is applicable for the given date/time per |filter|. 52 // Checks whether a study is applicable for the given date/time per |filter|.
49 bool CheckStudyEndDate(const Study::Filter& filter, 53 bool CheckStudyEndDate(const Study::Filter& filter,
50 const base::Time& date_time); 54 const base::Time& date_time);
51 55
52 // Checks whether a study is applicable for the given version per |filter|. 56 // Checks whether a study is applicable for the given version per |filter|.
53 bool CheckStudyVersion(const Study::Filter& filter, 57 bool CheckStudyVersion(const Study::Filter& filter,
(...skipping 22 matching lines...) Expand all
76 // validates and pre-processes them, adding any kept studies to the 80 // validates and pre-processes them, adding any kept studies to the
77 // |filtered_studies| list. Ensures that the resulting list will not have more 81 // |filtered_studies| list. Ensures that the resulting list will not have more
78 // than one study with the same name. 82 // than one study with the same name.
79 void FilterAndValidateStudies(const VariationsSeed& seed, 83 void FilterAndValidateStudies(const VariationsSeed& seed,
80 const ClientFilterableState& client_state, 84 const ClientFilterableState& client_state,
81 std::vector<ProcessedStudy>* filtered_studies); 85 std::vector<ProcessedStudy>* filtered_studies);
82 86
83 } // namespace variations 87 } // namespace variations
84 88
85 #endif // COMPONENTS_VARIATIONS_STUDY_FILTERING_H_ 89 #endif // COMPONENTS_VARIATIONS_STUDY_FILTERING_H_
OLDNEW
« no previous file with comments | « components/variations/service/variations_service.cc ('k') | components/variations/study_filtering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698