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

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

Issue 2433793003: Generalize Previews Type code (Closed)
Patch Set: tbansal comment Created 4 years, 2 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
« no previous file with comments | « components/previews/core/previews_decider.h ('k') | components/previews/core/previews_experiments.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/previews/core/previews_experiments.h
diff --git a/components/previews/core/previews_experiments.h b/components/previews/core/previews_experiments.h
index 9c8d7add0574d9a8f0a42d6a9bcdd75d41866221..520b45fb65b6cd678159521bb8364288215eab80 100644
--- a/components/previews/core/previews_experiments.h
+++ b/components/previews/core/previews_experiments.h
@@ -20,24 +20,30 @@ size_t MaxInMemoryHostsInBlackList();
// The number of recent navigations that were opted out of that would trigger
// the host to be blacklisted.
int BlackListOptOutThreshold();
// The amount of time a host remains blacklisted due to opt outs.
base::TimeDelta BlackListDuration();
} // namespace params
+enum class PreviewsType {
+ NONE = 0,
+ OFFLINE = 1,
+ LAST = 2,
+};
+
// Returns true if any client-side previews experiment is active.
bool IsIncludedInClientSidePreviewsExperimentsFieldTrial();
-// Returns true if the field trial that should enable offline pages for
+// Returns true if the field trial that should enable previews for |type| for
// prohibitvely slow networks is active.
-bool IsOfflinePreviewsEnabled();
+bool IsPreviewsTypeEnabled(PreviewsType type);
// Sets the appropriate state for field trial and variations to imitate the
// offline pages field trial.
bool EnableOfflinePreviewsForTesting();
} // namespace previews
#endif // COMPONENTS_PREVIEWS_CORE_PREVIEWS_EXPERIMENTS_H_
« no previous file with comments | « components/previews/core/previews_decider.h ('k') | components/previews/core/previews_experiments.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698