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

Unified Diff: components/dom_distiller/core/experiments.cc

Issue 2210683002: Do prefix matching for ReaderModeUI finch group (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/experiments.cc
diff --git a/components/dom_distiller/core/experiments.cc b/components/dom_distiller/core/experiments.cc
index 168f23eb846876d9278e5139a36d8b5c10532933..f3927b8a94b404de69eefb6e23942a77b5a3cf29 100644
--- a/components/dom_distiller/core/experiments.cc
+++ b/components/dom_distiller/core/experiments.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
+#include "base/strings/string_util.h"
#include "components/dom_distiller/core/dom_distiller_switches.h"
namespace dom_distiller {
@@ -31,10 +32,12 @@ DistillerHeuristicsType GetDistillerHeuristicsType() {
}
NOTREACHED() << "Invalid value for " << switches::kReaderModeHeuristics;
} else {
- if (group_name == "AdaBoost") {
+ if (base::StartsWith(group_name, "AdaBoost",
+ base::CompareCase::INSENSITIVE_ASCII)) {
return DistillerHeuristicsType::ADABOOST_MODEL;
}
- if (group_name == "OGArticle") {
+ if (base::StartsWith(group_name, "OGArticle",
+ base::CompareCase::INSENSITIVE_ASCII)) {
return DistillerHeuristicsType::OG_ARTICLE;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698