Chromium Code Reviews| Index: components/previews/core/previews_experiments.h |
| diff --git a/components/previews/core/previews_experiments.h b/components/previews/core/previews_experiments.h |
| index 7dd7bc2c42c574b296c58ff2391d1e556530a59a..4d37c9b14a2b3e673714f676f5375db533f12bcd 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(); |
| // Whether offline previews are enabled. |
| bool IsOfflinePreviewsEnabled(); |
| @@ -61,11 +62,11 @@ int OfflinePreviewsVersion(); |
| bool IsClientLoFiEnabled(); |
| // The blacklist version for Client LoFi previews. |
|
tbansal1
2017/05/05 20:34:39
Is this also the blacklist version for the server
RyanSturm
2017/05/05 20:51:35
Yes. At that layer, the two optimizations are indi
|
| -int ClientLoFiVersion(); |
| +int LoFiVersion(); |
| // The threshold of EffectiveConnectionType above which Client LoFi previews |
| // should not be served. |
| -net::EffectiveConnectionType EffectiveConnectionTypeThresholdForClientLoFi(); |
| +net::EffectiveConnectionType EffectiveConnectionTypeThresholdForLoFi(); |
| } // namespace params |
| @@ -75,12 +76,15 @@ 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; |
| @@ -88,6 +92,9 @@ typedef std::vector<std::pair<PreviewsType, int>> PreviewsTypeList; |
| // Returns true if any client-side previews experiment is active. |
| bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); |
| +// Gets the string representation of |type|. |
| +std::string GetStringNameForType(PreviewsType type); |
| + |
| } // namespace previews |
| #endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ |