Chromium Code Reviews| Index: components/previews/core/previews_experiments.cc |
| diff --git a/components/previews/core/previews_experiments.cc b/components/previews/core/previews_experiments.cc |
| index 3806bc9c8e8f6084023175e7ff2c222bed53c99f..573d0b65672e19770f45d94c6b16f0b93c2186d8 100644 |
| --- a/components/previews/core/previews_experiments.cc |
| +++ b/components/previews/core/previews_experiments.cc |
| @@ -179,6 +179,19 @@ bool IsPreviewsTypeEnabled(PreviewsType type) { |
| } |
| } |
| +std::unique_ptr<std::vector<std::pair<PreviewsType, int>>> |
| +GetEnabledPreviews() { |
| + std::unique_ptr<std::vector<std::pair<PreviewsType, int>>> enabled_previews( |
| + new std::vector<std::pair<PreviewsType, int>>()); |
| + |
| + // For now, all previews types have version 0. |
| + // TODO(dougarnett): Add finch control of version for previews types. |
|
RyanSturm
2017/01/25 23:17:53
I'd add the offline previews field trial support i
dougarnett
2017/01/26 00:48:26
Add param but followed current naming style. Pleas
|
| + if (IsPreviewsTypeEnabled(PreviewsType::OFFLINE)) { |
| + enabled_previews->push_back({PreviewsType::OFFLINE, 0}); |
| + } |
| + return enabled_previews; |
| +} |
| + |
| bool EnableOfflinePreviewsForTesting() { |
| std::map<std::string, std::string> params; |
| params[kOfflinePagesSlowNetwork] = kExperimentEnabled; |