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

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

Issue 2760063002: Add support to previews/ for Server LoFi and LitePages (Closed)
Patch Set: rebase 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.h
diff --git a/components/previews/core/previews_experiments.h b/components/previews/core/previews_experiments.h
index 6a7d7e74b1646d330d60ebf02819a04f9198979d..666bb77f71ec1fc31bd1f9223c4e76bc056cb46f 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>
@@ -49,7 +50,7 @@ base::TimeDelta OfflinePreviewFreshnessDuration();
// The threshold of EffectiveConnectionType above which offline previews should
// not be served.
-net::EffectiveConnectionType EffectiveConnectionTypeThresholdForOffline();
+net::EffectiveConnectionType EffectiveConnectionTypeThreshold();
tbansal1 2017/05/05 20:34:39 why rename this? As per the comment above, seems l
RyanSturm 2017/05/05 20:51:35 Done.
// 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_

Powered by Google App Engine
This is Rietveld 408576698