| 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..b595c4afe8b58aed21547645e023af04d7b81643 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"
|
|
|
| @@ -56,6 +60,8 @@ enum class PreviewsType {
|
| LAST = 2,
|
| };
|
|
|
| +typedef std::vector<std::pair<PreviewsType, int>> PreviewsTypeList;
|
| +
|
| // Returns true if any client-side previews experiment is active.
|
| bool IsIncludedInClientSidePreviewsExperimentsFieldTrial();
|
|
|
| @@ -63,6 +69,13 @@ bool IsIncludedInClientSidePreviewsExperimentsFieldTrial();
|
| // prohibitvely slow networks is active.
|
| bool IsPreviewsTypeEnabled(PreviewsType type);
|
|
|
| +// Returns the version of preview treatment |type|. Defaults to 0 if not
|
| +// specified in field trial config.
|
| +int GetPreviewsTypeVersion(PreviewsType type);
|
| +
|
| +// Returns the enabled PreviewsTypes with their version.
|
| +std::unique_ptr<PreviewsTypeList> GetEnabledPreviews();
|
| +
|
| // Sets the appropriate state for field trial and variations to imitate the
|
| // offline pages field trial.
|
| bool EnableOfflinePreviewsForTesting();
|
|
|