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

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

Issue 2640023007: Adds PreviewsType version mechanism for clearing blacklist entries. (Closed)
Patch Set: 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..8a425c7ad58309d2b911fcd4fe350f53a68f578d 100644
--- a/components/previews/core/previews_experiments.cc
+++ b/components/previews/core/previews_experiments.cc
@@ -179,6 +179,18 @@ bool IsPreviewsTypeEnabled(PreviewsType type) {
}
}
+std::vector<std::pair<PreviewsType, int>>* GetEnabledPreviews() {
+ 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.
+ 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