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

Unified Diff: chrome/browser/about_flags.cc

Issue 2763613002: Add DelayNavigationThrottle (Closed)
Patch Set: address some comments Created 3 years, 9 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 | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698