| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "base/version.h" | 13 #include "base/version.h" |
| 14 #include "components/variations/processed_study.h" | 14 #include "components/variations/processed_study.h" |
| 15 #include "components/variations/proto/study.pb.h" | 15 #include "components/variations/proto/study.pb.h" |
| 16 #include "components/variations/proto/variations_seed.pb.h" | 16 #include "components/variations/proto/variations_seed.pb.h" |
| 17 | 17 |
| 18 namespace chrome_variations { | 18 namespace variations { |
| 19 | 19 |
| 20 // Internal functions exposed for testing purposes only. | 20 // Internal functions exposed for testing purposes only. |
| 21 namespace internal { | 21 namespace internal { |
| 22 | 22 |
| 23 // Checks whether a study is applicable for the given |channel| per |filter|. | 23 // Checks whether a study is applicable for the given |channel| per |filter|. |
| 24 bool CheckStudyChannel(const Study_Filter& filter, Study_Channel channel); | 24 bool CheckStudyChannel(const Study_Filter& filter, Study_Channel channel); |
| 25 | 25 |
| 26 // Checks whether a study is applicable for the given |form_factor| per | 26 // Checks whether a study is applicable for the given |form_factor| per |
| 27 // |filter|. | 27 // |filter|. |
| 28 bool CheckStudyFormFactor(const Study_Filter& filter, | 28 bool CheckStudyFormFactor(const Study_Filter& filter, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // resulting list will not have more than one study with the same name. | 67 // resulting list will not have more than one study with the same name. |
| 68 void FilterAndValidateStudies(const VariationsSeed& seed, | 68 void FilterAndValidateStudies(const VariationsSeed& seed, |
| 69 const std::string& locale, | 69 const std::string& locale, |
| 70 const base::Time& reference_date, | 70 const base::Time& reference_date, |
| 71 const base::Version& version, | 71 const base::Version& version, |
| 72 Study_Channel channel, | 72 Study_Channel channel, |
| 73 Study_FormFactor form_factor, | 73 Study_FormFactor form_factor, |
| 74 const std::string& hardware_class, | 74 const std::string& hardware_class, |
| 75 std::vector<ProcessedStudy>* filtered_studies); | 75 std::vector<ProcessedStudy>* filtered_studies); |
| 76 | 76 |
| 77 } // namespace chrome_variations | 77 } // namespace variations |
| 78 | 78 |
| 79 #endif // COMPONENTS_VARIATIONS_STUDY_FILTERING_H_ | 79 #endif // COMPONENTS_VARIATIONS_STUDY_FILTERING_H_ |
| OLD | NEW |