OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 // Checks whether a study is applicable for the given |locale| per |filter|. | 36 // Checks whether a study is applicable for the given |locale| per |filter|. |
37 bool CheckStudyLocale(const Study_Filter& filter, const std::string& locale); | 37 bool CheckStudyLocale(const Study_Filter& filter, const std::string& locale); |
38 | 38 |
39 // Checks whether a study is applicable for the given |platform| per |filter|. | 39 // Checks whether a study is applicable for the given |platform| per |filter|. |
40 bool CheckStudyPlatform(const Study_Filter& filter, Study_Platform platform); | 40 bool CheckStudyPlatform(const Study_Filter& filter, Study_Platform platform); |
41 | 41 |
42 // Checks whether a study is applicable for the given date/time per |filter|. | 42 // Checks whether a study is applicable for the given date/time per |filter|. |
43 bool CheckStudyStartDate(const Study_Filter& filter, | 43 bool CheckStudyStartDate(const Study_Filter& filter, |
44 const base::Time& date_time); | 44 const base::Time& date_time); |
45 | 45 |
46 // Checks whether a study is applicable for the given date/time per |filter|. | |
47 bool CheckStudyEndDate(const Study_Filter& filter, const base::Time& date_time); | |
48 | |
49 // Checks whether a study is applicable for the given version per |filter|. | 46 // Checks whether a study is applicable for the given version per |filter|. |
50 bool CheckStudyVersion(const Study_Filter& filter, | 47 bool CheckStudyVersion(const Study_Filter& filter, |
51 const base::Version& version); | 48 const base::Version& version); |
52 | 49 |
53 // Checks whether a study is applicable for the given |country| per |filter|. | 50 // Checks whether a study is applicable for the given |country| per |filter|. |
54 bool CheckStudyCountry(const Study_Filter& filter, const std::string& country); | 51 bool CheckStudyCountry(const Study_Filter& filter, const std::string& country); |
55 | 52 |
56 // Checks whether |study| is expired using the given date/time. | 53 // Checks whether |study| is expired using the given date/time. |
57 bool IsStudyExpired(const Study& study, const base::Time& date_time); | 54 bool IsStudyExpired(const Study& study, const base::Time& date_time); |
58 | 55 |
(...skipping 20 matching lines...) Expand all Loading... |
79 Study_Channel channel, | 76 Study_Channel channel, |
80 Study_FormFactor form_factor, | 77 Study_FormFactor form_factor, |
81 const std::string& hardware_class, | 78 const std::string& hardware_class, |
82 const std::string& session_consistency_country, | 79 const std::string& session_consistency_country, |
83 const std::string& permanent_consistency_country, | 80 const std::string& permanent_consistency_country, |
84 std::vector<ProcessedStudy>* filtered_studies); | 81 std::vector<ProcessedStudy>* filtered_studies); |
85 | 82 |
86 } // namespace variations | 83 } // namespace variations |
87 | 84 |
88 #endif // COMPONENTS_VARIATIONS_STUDY_FILTERING_H_ | 85 #endif // COMPONENTS_VARIATIONS_STUDY_FILTERING_H_ |
OLD | NEW |