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

Unified Diff: chrome/browser/about_flags.cc

Issue 2711153004: predictors: Add an about:flags flag for speculative prefetch. (Closed)
Patch Set: Typo. 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/app/generated_resources.grd ('k') | chrome/browser/predictors/resource_prefetch_common.h » ('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 ff4735d76b77be76929353907895ed7fdb93cd9b..36b561dae288b66a4dbaeb9d8fc0b6caffbe984a 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -27,6 +27,7 @@
#include "build/build_config.h"
#include "cc/base/switches.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"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_content_client.h"
@@ -677,6 +678,19 @@ const FeatureEntry::FeatureVariation kNoStatePrefetchFeatureVariations[] = {
{"Simple load", kNoStatePrefetchSimpleLoad,
arraysize(kNoStatePrefetchSimpleLoad), nullptr}};
+const FeatureEntry::FeatureParam kSpeculativeResourcePrefetchingPrefetching[] =
+ {{predictors::kModeParamName, predictors::kPrefetchingMode}};
+
+const FeatureEntry::FeatureParam kSpeculativeResourcePrefetchingLearning[] = {
+ {predictors::kModeParamName, predictors::kLearningMode}};
+
+const FeatureEntry::FeatureVariation
+ kSpeculativeResourcePrefetchingFeatureVariations[] = {
+ {"Prefetching", kSpeculativeResourcePrefetchingPrefetching,
+ arraysize(kSpeculativeResourcePrefetchingPrefetching), nullptr},
+ {"Learning", kSpeculativeResourcePrefetchingLearning,
+ arraysize(kSpeculativeResourcePrefetchingLearning), nullptr}};
+
#if defined(OS_ANDROID)
const FeatureEntry::FeatureParam
kAutofillCreditCardPopupLayoutFeatureVariationIconAtStart[] = {
@@ -2328,6 +2342,13 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(chrome::android::kCustomFeedbackUi)},
#endif // OS_ANDROID
+ {"enable-resource-prefetch", IDS_FLAGS_SPECULATIVE_PREFETCH_NAME,
+ IDS_FLAGS_SPECULATIVE_PREFETCH_DESCRIPTION, kOsAll,
+ FEATURE_WITH_VARIATIONS_VALUE_TYPE(
+ predictors::kSpeculativeResourcePrefetchingFeature,
+ kSpeculativeResourcePrefetchingFeatureVariations,
+ "SpeculativeResourcePrefetchingValidation")},
+
// 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/app/generated_resources.grd ('k') | chrome/browser/predictors/resource_prefetch_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698