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

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

Issue 2854893003: Adding an Android about:flags feature for offline previews (Closed)
Patch Set: Created 3 years, 8 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 e8d738aa60a6b5fb0c735ab700faf301582065a2..87f3af14a01c716a740d5eed95d6cdef036fe30b 100644
--- a/components/previews/core/previews_experiments.cc
+++ b/components/previews/core/previews_experiments.cc
@@ -6,11 +6,13 @@
#include <string>
+#include "base/feature_list.h"
#include "base/logging.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
+#include "components/previews/core/previews_features.h"
namespace previews {
@@ -136,10 +138,11 @@ net::EffectiveConnectionType EffectiveConnectionTypeThresholdForOffline() {
bool IsOfflinePreviewsEnabled() {
// Check if "show_offline_pages" is set to "true".
- return IsIncludedInClientSidePreviewsExperimentsFieldTrial() &&
- base::GetFieldTrialParamValue(kClientSidePreviewsFieldTrial,
- kOfflinePagesSlowNetwork) ==
- kExperimentEnabled;
+ return base::FeatureList::IsEnabled(features::kOfflinePreviews) ||
+ (IsIncludedInClientSidePreviewsExperimentsFieldTrial() &&
tbansal1 2017/05/03 17:35:19 IIUC, this is not required anymore. Can we delete
RyanSturm 2017/05/03 21:26:25 Not sure what you mean. I have to adjust the finch
tbansal1 2017/05/03 22:54:04 Got it. In that case, should IsIncludedInClientSid
+ base::GetFieldTrialParamValue(kClientSidePreviewsFieldTrial,
+ kOfflinePagesSlowNetwork) ==
+ kExperimentEnabled);
}
int OfflinePreviewsVersion() {

Powered by Google App Engine
This is Rietveld 408576698