Chromium Code Reviews| Index: components/variations/processed_study.cc |
| diff --git a/components/variations/processed_study.cc b/components/variations/processed_study.cc |
| index 9d0e4f14d512dbda40a6fda36a672a178e1257b0..bc534f63bec8be0e0460e4f3fb84a652db1f0377 100644 |
| --- a/components/variations/processed_study.cc |
| +++ b/components/variations/processed_study.cc |
| @@ -91,6 +91,17 @@ bool ProcessedStudy::Init(const Study* study, bool is_expired) { |
| return true; |
| } |
| +int ProcessedStudy::GetExperimentIndexByName( |
| + const std::string& name) const { |
| + for (int i = 0; i < study_->experiment_size(); ++i) { |
| + if (study_->experiment(i).name() == name) { |
|
Alexei Svitkine (slow)
2014/07/03 17:54:40
Nit: No need for {}'s.
jwd
2014/07/07 15:52:20
Done.
|
| + return i; |
| + } |
| + } |
| + |
| + return -1; |
| +} |
| + |
| // static |
| bool ProcessedStudy::ValidateAndAppendStudy( |
| const Study* study, |