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

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

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
« no previous file with comments | « components/previews/core/previews_decider.h ('k') | components/previews/core/previews_experiments.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/previews/core/previews_experiments.h
diff --git a/components/previews/core/previews_experiments.h b/components/previews/core/previews_experiments.h
index 6a7d7e74b1646d330d60ebf02819a04f9198979d..b7dd59954a5fffe89468eea04ee86b7848bdddbb 100644
--- a/components/previews/core/previews_experiments.h
+++ b/components/previews/core/previews_experiments.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
#define COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
+#include <string>
#include <utility>
#include <vector>
@@ -47,9 +48,9 @@ base::TimeDelta SingleOptOutDuration();
// shown as a preview.
base::TimeDelta OfflinePreviewFreshnessDuration();
-// The threshold of EffectiveConnectionType above which offline previews should
-// not be served.
-net::EffectiveConnectionType EffectiveConnectionTypeThresholdForOffline();
+// The threshold of EffectiveConnectionType above which previews will trigger by
+// default.
+net::EffectiveConnectionType DefaultEffectiveConnectionTypeThreshold();
// Whether offline previews are enabled.
bool IsOfflinePreviewsEnabled();
@@ -75,16 +76,22 @@ enum class PreviewsType {
// The user is shown an offline page as a preview.
OFFLINE = 1,
- // Replace images with placeholders generated on the client.
- CLIENT_LOFI = 2,
+ // Replace images with placeholders.
+ LOFI = 2,
+
+ // The user is shown a server lite page.
+ LITE_PAGE = 3,
// Insert new enum values here. Keep values sequential to allow looping
// from NONE+1 to LAST-1.
- LAST = 3,
+ LAST = 4,
};
typedef std::vector<std::pair<PreviewsType, int>> PreviewsTypeList;
+// Gets the string representation of |type|.
+std::string GetStringNameForType(PreviewsType type);
+
} // namespace previews
#endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
« no previous file with comments | « components/previews/core/previews_decider.h ('k') | components/previews/core/previews_experiments.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698