Chromium Code Reviews| Index: chrome/browser/about_flags.cc |
| diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc |
| index a429648555f2fe9e804f7a9c9aed318be35ce02b..7d2cc17b91054453af6ad47e375714219d24d49e 100644 |
| --- a/chrome/browser/about_flags.cc |
| +++ b/chrome/browser/about_flags.cc |
| @@ -26,6 +26,7 @@ |
| #include "base/values.h" |
| #include "build/build_config.h" |
| #include "cc/base/switches.h" |
| +#include "chrome/browser/loader/delay_navigation_throttle.h" |
| #include "chrome/browser/ntp_snippets/ntp_snippets_features.h" |
| #include "chrome/browser/predictors/resource_prefetch_common.h" |
| #include "chrome/browser/prerender/prerender_field_trial.h" |
| @@ -763,6 +764,20 @@ const FeatureEntry::FeatureVariation |
| arraysize(kAutofillCreditCardLastUsedDateFeatureVariationExpDate), |
| nullptr}}; |
| +const FeatureEntry::FeatureParam kDelayNavigation5SecondDelay[] = { |
| + {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, |
|
Charlie Harrison
2017/03/22 18:06:44
5s seems extreme. Is that going to be an experimen
|
| + {DelayNavigationThrottle::kParamDelayNavigationProbability, "1"}}; |
| + |
| +const FeatureEntry::FeatureParam kDelayNavigation5SecondDelay25Percent[] = { |
| + {DelayNavigationThrottle::kParamDelayNavigationDurationMillis, "5000"}, |
| + {DelayNavigationThrottle::kParamDelayNavigationProbability, "0.25"}}; |
| + |
| +const FeatureEntry::FeatureVariation kDelayNavigationFeatureVariations[] = { |
| + {"(5 second delay, 100% probability)", kDelayNavigation5SecondDelay, |
| + arraysize(kDelayNavigation5SecondDelay), nullptr}, |
| + {"(5 second delay, 25% probability)", kDelayNavigation5SecondDelay25Percent, |
| + arraysize(kDelayNavigation5SecondDelay25Percent), nullptr}}; |
| + |
| // RECORDING USER METRICS FOR FLAGS: |
| // ----------------------------------------------------------------------------- |
| // The first line of the entry is the internal name. |
| @@ -2407,6 +2422,12 @@ const FeatureEntry kFeatureEntries[] = { |
| FEATURE_VALUE_TYPE(chrome::android::kUseNewDoodleApi)}, |
| #endif // OS_ANDROID |
| + {"delay-navigation", IDS_FLAGS_DELAY_NAVIGATION_NAME, |
| + IDS_FLAGS_DELAY_NAVIGATION_DESCRIPTION, kOsAll, |
| + FEATURE_WITH_PARAMS_VALUE_TYPE(kDelayNavigationFeature, |
| + kDelayNavigationFeatureVariations, |
| + "DelayNavigation")}, |
| + |
| // NOTE: Adding new command-line switches requires adding corresponding |
| // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |