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

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

Issue 2612243003: Supporting study definitions without default groups and end_date filtering. (Closed)
Patch Set: removing static initializer Created 3 years, 11 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
« no previous file with comments | « components/variations/proto/study.proto ('k') | components/variations/study_filtering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
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
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_
OLDNEW
« no previous file with comments | « components/variations/proto/study.proto ('k') | components/variations/study_filtering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698