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

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

Issue 1809633003: Allow trials to associate without overriding a feature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment. Created 4 years, 9 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 | « base/feature_list_unittest.cc ('k') | components/variations/processed_study.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PROCESSED_STUDY_H_ 5 #ifndef COMPONENTS_VARIATIONS_PROCESSED_STUDY_H_
6 #define COMPONENTS_VARIATIONS_PROCESSED_STUDY_H_ 6 #define COMPONENTS_VARIATIONS_PROCESSED_STUDY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 base::FieldTrial::Probability total_probability() const { 28 base::FieldTrial::Probability total_probability() const {
29 return total_probability_; 29 return total_probability_;
30 } 30 }
31 31
32 bool all_assignments_to_one_group() const { 32 bool all_assignments_to_one_group() const {
33 return all_assignments_to_one_group_; 33 return all_assignments_to_one_group_;
34 } 34 }
35 35
36 bool is_expired() const { return is_expired_; } 36 bool is_expired() const { return is_expired_; }
37 37
38 const std::string& single_feature_name() const {
39 return single_feature_name_;
40 }
41
38 // Gets the index of the experiment with the given |name|. Returns -1 if no 42 // Gets the index of the experiment with the given |name|. Returns -1 if no
39 // experiment is found. 43 // experiment is found.
40 int GetExperimentIndexByName(const std::string& name) const; 44 int GetExperimentIndexByName(const std::string& name) const;
41 45
42 static bool ValidateAndAppendStudy( 46 static bool ValidateAndAppendStudy(
43 const Study* study, 47 const Study* study,
44 bool is_expired, 48 bool is_expired,
45 std::vector<ProcessedStudy>* processed_studies); 49 std::vector<ProcessedStudy>* processed_studies);
46 50
47 private: 51 private:
48 // Corresponding Study object. Weak reference. 52 // Corresponding Study object. Weak reference.
49 const Study* study_; 53 const Study* study_;
50 54
51 // Computed total group probability for the study. 55 // Computed total group probability for the study.
52 base::FieldTrial::Probability total_probability_; 56 base::FieldTrial::Probability total_probability_;
53 57
54 // Whether all assignments are to a single group. 58 // Whether all assignments are to a single group.
55 bool all_assignments_to_one_group_; 59 bool all_assignments_to_one_group_;
56 60
57 // Whether the study is expired. 61 // Whether the study is expired.
58 bool is_expired_; 62 bool is_expired_;
63
64 // If the study has groups that enable/disable a single feature, the name of
65 // that feature.
66 std::string single_feature_name_;
59 }; 67 };
60 68
61 } // namespace variations 69 } // namespace variations
62 70
63 #endif // COMPONENTS_VARIATIONS_PROCESSED_STUDY_H_ 71 #endif // COMPONENTS_VARIATIONS_PROCESSED_STUDY_H_
OLDNEW
« no previous file with comments | « base/feature_list_unittest.cc ('k') | components/variations/processed_study.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698