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

Unified Diff: components/variations/processed_study.cc

Issue 370463003: Add support for variations controlled overriding UI strings to the variations service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698