| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/stl_util.h" | 21 #include "base/stl_util.h" |
| 22 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
| 23 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
| 24 #include "base/strings/utf_string_conversions.h" | 24 #include "base/strings/utf_string_conversions.h" |
| 25 #include "base/task_scheduler/switches.h" | 25 #include "base/task_scheduler/switches.h" |
| 26 #include "base/values.h" | 26 #include "base/values.h" |
| 27 #include "build/build_config.h" | 27 #include "build/build_config.h" |
| 28 #include "cc/base/switches.h" | 28 #include "cc/base/switches.h" |
| 29 #include "chrome/browser/experiments/memory_ablation_experiment.h" | 29 #include "chrome/browser/experiments/memory_ablation_experiment.h" |
| 30 #include "chrome/browser/flag_descriptions.h" | 30 #include "chrome/browser/flag_descriptions.h" |
| 31 #include "chrome/browser/net/prediction_options.h" |
| 31 #include "chrome/browser/predictors/resource_prefetch_common.h" | 32 #include "chrome/browser/predictors/resource_prefetch_common.h" |
| 32 #include "chrome/browser/prerender/prerender_field_trial.h" | 33 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 33 #include "chrome/common/channel_info.h" | 34 #include "chrome/common/channel_info.h" |
| 34 #include "chrome/common/chrome_content_client.h" | 35 #include "chrome/common/chrome_content_client.h" |
| 35 #include "chrome/common/chrome_features.h" | 36 #include "chrome/common/chrome_features.h" |
| 36 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
| 37 #include "chrome/common/features.h" | 38 #include "chrome/common/features.h" |
| 38 #include "chrome/common/pause_tabs_field_trial.h" | 39 #include "chrome/common/pause_tabs_field_trial.h" |
| 39 #include "components/autofill/core/browser/autofill_experiments.h" | 40 #include "components/autofill/core/browser/autofill_experiments.h" |
| 40 #include "components/autofill/core/common/autofill_switches.h" | 41 #include "components/autofill/core/common/autofill_switches.h" |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 const FeatureEntry::FeatureParam kSpeculativeResourcePrefetchingLearning[] = { | 805 const FeatureEntry::FeatureParam kSpeculativeResourcePrefetchingLearning[] = { |
| 805 {predictors::kModeParamName, predictors::kLearningMode}}; | 806 {predictors::kModeParamName, predictors::kLearningMode}}; |
| 806 | 807 |
| 807 const FeatureEntry::FeatureVariation | 808 const FeatureEntry::FeatureVariation |
| 808 kSpeculativeResourcePrefetchingFeatureVariations[] = { | 809 kSpeculativeResourcePrefetchingFeatureVariations[] = { |
| 809 {"Prefetching", kSpeculativeResourcePrefetchingPrefetching, | 810 {"Prefetching", kSpeculativeResourcePrefetchingPrefetching, |
| 810 arraysize(kSpeculativeResourcePrefetchingPrefetching), nullptr}, | 811 arraysize(kSpeculativeResourcePrefetchingPrefetching), nullptr}, |
| 811 {"Learning", kSpeculativeResourcePrefetchingLearning, | 812 {"Learning", kSpeculativeResourcePrefetchingLearning, |
| 812 arraysize(kSpeculativeResourcePrefetchingLearning), nullptr}}; | 813 arraysize(kSpeculativeResourcePrefetchingLearning), nullptr}}; |
| 813 | 814 |
| 815 const FeatureEntry::Choice kNetworkPredictionOptionsForServiceWorkerChoices[] = |
| 816 { |
| 817 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 818 {chrome_browser_net::kPreconnectOnly, |
| 819 switches::kNetworkPredictionOptionsForServiceWorker, |
| 820 chrome_browser_net::kPreconnectOnly}, |
| 821 {chrome_browser_net::kStartServiceWorkerAndPreconnect, |
| 822 switches::kNetworkPredictionOptionsForServiceWorker, |
| 823 chrome_browser_net::kStartServiceWorkerAndPreconnect}, |
| 824 {chrome_browser_net::kStartServiceWorkerAndDeferPreconnect, |
| 825 switches::kNetworkPredictionOptionsForServiceWorker, |
| 826 chrome_browser_net::kStartServiceWorkerAndDeferPreconnect}, |
| 827 {chrome_browser_net::kStartServiceWorkerOnly, |
| 828 switches::kNetworkPredictionOptionsForServiceWorker, |
| 829 chrome_browser_net::kStartServiceWorkerOnly}, |
| 830 }; |
| 831 |
| 814 #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MACOSX) || \ | 832 #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MACOSX) || \ |
| 815 defined(OS_WIN) | 833 defined(OS_WIN) |
| 816 const FeatureEntry::FeatureParam kPauseBackgroundTabsMinimalEngagment[] = { | 834 const FeatureEntry::FeatureParam kPauseBackgroundTabsMinimalEngagment[] = { |
| 817 {pausetabs::kFeatureName, pausetabs::kModeParamMinimal}}; | 835 {pausetabs::kFeatureName, pausetabs::kModeParamMinimal}}; |
| 818 | 836 |
| 819 const FeatureEntry::FeatureParam kPauseBackgroundTabsLowEngagment[] = { | 837 const FeatureEntry::FeatureParam kPauseBackgroundTabsLowEngagment[] = { |
| 820 {pausetabs::kFeatureName, pausetabs::kModeParamLow}}; | 838 {pausetabs::kFeatureName, pausetabs::kModeParamLow}}; |
| 821 | 839 |
| 822 const FeatureEntry::FeatureParam kPauseBackgroundTabsMediumEngagment[] = { | 840 const FeatureEntry::FeatureParam kPauseBackgroundTabsMediumEngagment[] = { |
| 823 {pausetabs::kFeatureName, pausetabs::kModeParamMedium}}; | 841 {pausetabs::kFeatureName, pausetabs::kModeParamMedium}}; |
| (...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2835 FEATURE_VALUE_TYPE(chrome::android::kCustomFeedbackUi)}, | 2853 FEATURE_VALUE_TYPE(chrome::android::kCustomFeedbackUi)}, |
| 2836 #endif // OS_ANDROID | 2854 #endif // OS_ANDROID |
| 2837 | 2855 |
| 2838 {"enable-resource-prefetch", flag_descriptions::kSpeculativePrefetchName, | 2856 {"enable-resource-prefetch", flag_descriptions::kSpeculativePrefetchName, |
| 2839 flag_descriptions::kSpeculativePrefetchDescription, kOsAll, | 2857 flag_descriptions::kSpeculativePrefetchDescription, kOsAll, |
| 2840 FEATURE_WITH_PARAMS_VALUE_TYPE( | 2858 FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 2841 predictors::kSpeculativeResourcePrefetchingFeature, | 2859 predictors::kSpeculativeResourcePrefetchingFeature, |
| 2842 kSpeculativeResourcePrefetchingFeatureVariations, | 2860 kSpeculativeResourcePrefetchingFeatureVariations, |
| 2843 "SpeculativeResourcePrefetchingValidation")}, | 2861 "SpeculativeResourcePrefetchingValidation")}, |
| 2844 | 2862 |
| 2863 {"network-prediction-options-for-service-worker", |
| 2864 flag_descriptions::kNetworkPredictionOptionsForServiceWorkerName, |
| 2865 flag_descriptions::kNetworkPredictionOptionsForServiceWorkerDescription, |
| 2866 kOsAll, |
| 2867 MULTI_VALUE_TYPE(kNetworkPredictionOptionsForServiceWorkerChoices)}, |
| 2868 |
| 2845 {"enable-off-main-thread-fetch", flag_descriptions::kOffMainThreadFetchName, | 2869 {"enable-off-main-thread-fetch", flag_descriptions::kOffMainThreadFetchName, |
| 2846 flag_descriptions::kOffMainThreadFetchDescription, kOsAll, | 2870 flag_descriptions::kOffMainThreadFetchDescription, kOsAll, |
| 2847 FEATURE_VALUE_TYPE(features::kOffMainThreadFetch)}, | 2871 FEATURE_VALUE_TYPE(features::kOffMainThreadFetch)}, |
| 2848 | 2872 |
| 2849 #if defined(OS_MACOSX) | 2873 #if defined(OS_MACOSX) |
| 2850 {"tab-strip-keyboard-focus", flag_descriptions::kTabStripKeyboardFocusName, | 2874 {"tab-strip-keyboard-focus", flag_descriptions::kTabStripKeyboardFocusName, |
| 2851 flag_descriptions::kTabStripKeyboardFocusDescription, kOsMac, | 2875 flag_descriptions::kTabStripKeyboardFocusDescription, kOsMac, |
| 2852 FEATURE_VALUE_TYPE(features::kTabStripKeyboardFocus)}, | 2876 FEATURE_VALUE_TYPE(features::kTabStripKeyboardFocus)}, |
| 2853 #endif | 2877 #endif |
| 2854 | 2878 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3266 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 3290 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 3267 | 3291 |
| 3268 const FeatureEntry* GetFeatureEntries(size_t* count) { | 3292 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 3269 *count = arraysize(kFeatureEntries); | 3293 *count = arraysize(kFeatureEntries); |
| 3270 return kFeatureEntries; | 3294 return kFeatureEntries; |
| 3271 } | 3295 } |
| 3272 | 3296 |
| 3273 } // namespace testing | 3297 } // namespace testing |
| 3274 | 3298 |
| 3275 } // namespace about_flags | 3299 } // namespace about_flags |
| OLD | NEW |