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

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

Issue 2961533002: Add "AllArticles" mode to Reader Mode heuristics (Closed)
Patch Set: Revert "exclude ios" Created 3 years, 5 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/dom_distiller/core/experiments.cc
diff --git a/components/dom_distiller/core/experiments.cc b/components/dom_distiller/core/experiments.cc
index 900daecd4b50191ebee2d68ceba68582b543f0e0..ba011f508f9afc573d132a6db9dc4c7050b927ab 100644
--- a/components/dom_distiller/core/experiments.cc
+++ b/components/dom_distiller/core/experiments.cc
@@ -21,6 +21,9 @@ DistillerHeuristicsType GetDistillerHeuristicsType() {
if (switch_value == switches::reader_mode_heuristics::kAdaBoost) {
return DistillerHeuristicsType::ADABOOST_MODEL;
}
+ if (switch_value == switches::reader_mode_heuristics::kAllArticles) {
+ return DistillerHeuristicsType::ALL_ARTICLES;
+ }
if (switch_value == switches::reader_mode_heuristics::kOGArticle) {
return DistillerHeuristicsType::OG_ARTICLE;
}
@@ -36,6 +39,10 @@ DistillerHeuristicsType GetDistillerHeuristicsType() {
base::CompareCase::INSENSITIVE_ASCII)) {
return DistillerHeuristicsType::ADABOOST_MODEL;
}
+ if (base::StartsWith(group_name, "AllArticles",
+ base::CompareCase::INSENSITIVE_ASCII)) {
+ return DistillerHeuristicsType::ALL_ARTICLES;
+ }
if (base::StartsWith(group_name, "OGArticle",
base::CompareCase::INSENSITIVE_ASCII)) {
return DistillerHeuristicsType::OG_ARTICLE;
« no previous file with comments | « components/dom_distiller/core/experiments.h ('k') | ios/chrome/browser/ui/reader_mode/reader_mode_checker.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698