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