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

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

Issue 2760063002: Add support to previews/ for Server LoFi and LitePages (Closed)
Patch Set: comment fix Created 3 years, 7 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 546457dc95fc2f9750387d86f4dd426664364afd..08ffef7a38a25b5f4f7ed9a72a5d563286f6f254 100644
--- a/components/previews/core/previews_experiments.cc
+++ b/components/previews/core/previews_experiments.cc
@@ -4,8 +4,6 @@
#include "components/previews/core/previews_experiments.h"
-#include <string>
-
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
@@ -139,7 +137,7 @@ base::TimeDelta OfflinePreviewFreshnessDuration() {
"offline_preview_freshness_duration_in_days", 7));
}
-net::EffectiveConnectionType EffectiveConnectionTypeThresholdForOffline() {
+net::EffectiveConnectionType DefaultEffectiveConnectionTypeThreshold() {
return GetParamValueAsECT(kClientSidePreviewsFieldTrial,
kEffectiveConnectionTypeThreshold,
net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
@@ -176,4 +174,20 @@ net::EffectiveConnectionType EffectiveConnectionTypeThresholdForClientLoFi() {
} // namespace params
+std::string GetStringNameForType(PreviewsType type) {
+ switch (type) {
+ case PreviewsType::OFFLINE:
+ return "Offline";
+ case PreviewsType::LOFI:
+ return "LoFi";
+ case PreviewsType::LITE_PAGE:
+ return "LitePage";
+ case PreviewsType::NONE:
+ case PreviewsType::LAST:
+ break;
+ }
+ NOTREACHED();
+ return std::string();
+}
+
} // namespace previews
« no previous file with comments | « components/previews/core/previews_experiments.h ('k') | components/previews/core/previews_experiments_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698