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 ad0bded4a856ee7de386c5c329e28415dd0504a2..4db8fc3be8ec89e7a71394b989948b7749330db7 100644 |
| --- a/components/previews/core/previews_experiments.h |
| +++ b/components/previews/core/previews_experiments.h |
| @@ -5,6 +5,10 @@ |
| #ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ |
| #define COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_ |
| +#include <memory> |
| +#include <utility> |
| +#include <vector> |
| + |
| #include "base/time/time.h" |
| #include "net/nqe/effective_connection_type.h" |
| @@ -63,6 +67,13 @@ bool IsIncludedInClientSidePreviewsExperimentsFieldTrial(); |
| // prohibitvely slow networks is active. |
| bool IsPreviewsTypeEnabled(PreviewsType type); |
| +// Returns the version of preview treatment |type| to use if it is enabled. |
| +// Should only be called if |IsPreviewsTypeEnabled(type)| returns true. |
|
bengr
2017/02/09 17:33:47
Why? Isn't a version independent of whether it is
dougarnett
2017/02/13 17:56:17
Done.
|
| +int GetPreviewsTypeVersion(PreviewsType type); |
| + |
| +// Returns the enabled PreviewsTypes with their version. |
| +std::unique_ptr<std::vector<std::pair<PreviewsType, int>>> GetEnabledPreviews(); |
|
bengr
2017/02/09 17:33:47
Might be more readable if you define a PreviewsTyp
dougarnett
2017/02/13 17:56:17
Done.
|
| + |
| // Sets the appropriate state for field trial and variations to imitate the |
| // offline pages field trial. |
| bool EnableOfflinePreviewsForTesting(); |