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

Unified Diff: components/previews/core/previews_experiments.cc

Issue 2760063002: Add support to previews/ for Server LoFi and LitePages (Closed)
Patch Set: rebase and previews_service_unittest.cc Created 3 years, 8 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/previews/core/previews_experiments.cc
diff --git a/components/previews/core/previews_experiments.cc b/components/previews/core/previews_experiments.cc
index e8d738aa60a6b5fb0c735ab700faf301582065a2..9709c61bacbe0441a8703112c0e6312f11a99ebd 100644
--- a/components/previews/core/previews_experiments.cc
+++ b/components/previews/core/previews_experiments.cc
@@ -173,4 +173,22 @@ bool IsIncludedInClientSidePreviewsExperimentsFieldTrial() {
kEnabled, base::CompareCase::SENSITIVE);
}
+std::string GetStringNameForType(PreviewsType type) {
+ switch (type) {
+ case PreviewsType::OFFLINE:
+ return "Offline";
+ case PreviewsType::CLIENT_LOFI:
+ return "ClientLoFi";
+ case PreviewsType::SERVER_LOFI:
+ return "ServerLoFi";
+ case PreviewsType::LITE_PAGE:
+ return "LitePage";
+ case PreviewsType::NONE:
+ case PreviewsType::LAST:
+ break;
+ }
+ NOTREACHED();
+ return std::string();
+}
+
} // namespace previews

Powered by Google App Engine
This is Rietveld 408576698