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

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

Issue 2640023007: Adds PreviewsType version mechanism for clearing blacklist entries. (Closed)
Patch Set: Removed std::move Created 3 years, 11 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.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;

Powered by Google App Engine
This is Rietveld 408576698