| 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 "chrome/grit/chromium_strings.h" | 40 #include "chrome/grit/chromium_strings.h" |
| 40 #include "components/autofill/core/browser/autofill_experiments.h" | 41 #include "components/autofill/core/browser/autofill_experiments.h" |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 const FeatureEntry::FeatureParam kSpeculativeResourcePrefetchingLearning[] = { | 807 const FeatureEntry::FeatureParam kSpeculativeResourcePrefetchingLearning[] = { |
| 807 {predictors::kModeParamName, predictors::kLearningMode}}; | 808 {predictors::kModeParamName, predictors::kLearningMode}}; |
| 808 | 809 |
| 809 const FeatureEntry::FeatureVariation | 810 const FeatureEntry::FeatureVariation |
| 810 kSpeculativeResourcePrefetchingFeatureVariations[] = { | 811 kSpeculativeResourcePrefetchingFeatureVariations[] = { |
| 811 {"Prefetching", kSpeculativeResourcePrefetchingPrefetching, | 812 {"Prefetching", kSpeculativeResourcePrefetchingPrefetching, |
| 812 arraysize(kSpeculativeResourcePrefetchingPrefetching), nullptr}, | 813 arraysize(kSpeculativeResourcePrefetchingPrefetching), nullptr}, |
| 813 {"Learning", kSpeculativeResourcePrefetchingLearning, | 814 {"Learning", kSpeculativeResourcePrefetchingLearning, |
| 814 arraysize(kSpeculativeResourcePrefetchingLearning), nullptr}}; | 815 arraysize(kSpeculativeResourcePrefetchingLearning), nullptr}}; |
| 815 | 816 |
| 817 const FeatureEntry::Choice kNetworkPredictionOptionsForServiceWorkerChoices[] = |
| 818 { |
| 819 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, |
| 820 {chrome_browser_net::kPreconnectOnly, |
| 821 switches::kNetworkPredictionOptionsForServiceWorker, |
| 822 chrome_browser_net::kPreconnectOnly}, |
| 823 {chrome_browser_net::kStartServiceWorkerAndPreconnect, |
| 824 switches::kNetworkPredictionOptionsForServiceWorker, |
| 825 chrome_browser_net::kStartServiceWorkerAndPreconnect}, |
| 826 {chrome_browser_net::kStartServiceWorkerAndDeferPreconnect, |
| 827 switches::kNetworkPredictionOptionsForServiceWorker, |
| 828 chrome_browser_net::kStartServiceWorkerAndDeferPreconnect}, |
| 829 {chrome_browser_net::kStartServiceWorkerOnly, |
| 830 switches::kNetworkPredictionOptionsForServiceWorker, |
| 831 chrome_browser_net::kStartServiceWorkerOnly}, |
| 832 }; |
| 833 |
| 816 #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MACOSX) || \ | 834 #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_MACOSX) || \ |
| 817 defined(OS_WIN) | 835 defined(OS_WIN) |
| 818 const FeatureEntry::FeatureParam kPauseBackgroundTabsMinimalEngagment[] = { | 836 const FeatureEntry::FeatureParam kPauseBackgroundTabsMinimalEngagment[] = { |
| 819 {pausetabs::kFeatureName, pausetabs::kModeParamMinimal}}; | 837 {pausetabs::kFeatureName, pausetabs::kModeParamMinimal}}; |
| 820 | 838 |
| 821 const FeatureEntry::FeatureParam kPauseBackgroundTabsLowEngagment[] = { | 839 const FeatureEntry::FeatureParam kPauseBackgroundTabsLowEngagment[] = { |
| 822 {pausetabs::kFeatureName, pausetabs::kModeParamLow}}; | 840 {pausetabs::kFeatureName, pausetabs::kModeParamLow}}; |
| 823 | 841 |
| 824 const FeatureEntry::FeatureParam kPauseBackgroundTabsMediumEngagment[] = { | 842 const FeatureEntry::FeatureParam kPauseBackgroundTabsMediumEngagment[] = { |
| 825 {pausetabs::kFeatureName, pausetabs::kModeParamMedium}}; | 843 {pausetabs::kFeatureName, pausetabs::kModeParamMedium}}; |
| (...skipping 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2843 FEATURE_VALUE_TYPE(chrome::android::kCustomFeedbackUi)}, | 2861 FEATURE_VALUE_TYPE(chrome::android::kCustomFeedbackUi)}, |
| 2844 #endif // OS_ANDROID | 2862 #endif // OS_ANDROID |
| 2845 | 2863 |
| 2846 {"enable-resource-prefetch", flag_descriptions::kSpeculativePrefetchName, | 2864 {"enable-resource-prefetch", flag_descriptions::kSpeculativePrefetchName, |
| 2847 flag_descriptions::kSpeculativePrefetchDescription, kOsAll, | 2865 flag_descriptions::kSpeculativePrefetchDescription, kOsAll, |
| 2848 FEATURE_WITH_PARAMS_VALUE_TYPE( | 2866 FEATURE_WITH_PARAMS_VALUE_TYPE( |
| 2849 predictors::kSpeculativeResourcePrefetchingFeature, | 2867 predictors::kSpeculativeResourcePrefetchingFeature, |
| 2850 kSpeculativeResourcePrefetchingFeatureVariations, | 2868 kSpeculativeResourcePrefetchingFeatureVariations, |
| 2851 "SpeculativeResourcePrefetchingValidation")}, | 2869 "SpeculativeResourcePrefetchingValidation")}, |
| 2852 | 2870 |
| 2871 {"network-prediction-options-for-service-worker", |
| 2872 flag_descriptions::kNetworkPredictionOptionsForServiceWorkerName, |
| 2873 flag_descriptions::kNetworkPredictionOptionsForServiceWorkerDescription, |
| 2874 kOsAll, |
| 2875 MULTI_VALUE_TYPE(kNetworkPredictionOptionsForServiceWorkerChoices)}, |
| 2876 |
| 2853 {"enable-off-main-thread-fetch", flag_descriptions::kOffMainThreadFetchName, | 2877 {"enable-off-main-thread-fetch", flag_descriptions::kOffMainThreadFetchName, |
| 2854 flag_descriptions::kOffMainThreadFetchDescription, kOsAll, | 2878 flag_descriptions::kOffMainThreadFetchDescription, kOsAll, |
| 2855 FEATURE_VALUE_TYPE(features::kOffMainThreadFetch)}, | 2879 FEATURE_VALUE_TYPE(features::kOffMainThreadFetch)}, |
| 2856 | 2880 |
| 2857 #if defined(OS_MACOSX) | 2881 #if defined(OS_MACOSX) |
| 2858 {"tab-strip-keyboard-focus", flag_descriptions::kTabStripKeyboardFocusName, | 2882 {"tab-strip-keyboard-focus", flag_descriptions::kTabStripKeyboardFocusName, |
| 2859 flag_descriptions::kTabStripKeyboardFocusDescription, kOsMac, | 2883 flag_descriptions::kTabStripKeyboardFocusDescription, kOsMac, |
| 2860 FEATURE_VALUE_TYPE(features::kTabStripKeyboardFocus)}, | 2884 FEATURE_VALUE_TYPE(features::kTabStripKeyboardFocus)}, |
| 2861 #endif | 2885 #endif |
| 2862 | 2886 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3274 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; | 3298 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; |
| 3275 | 3299 |
| 3276 const FeatureEntry* GetFeatureEntries(size_t* count) { | 3300 const FeatureEntry* GetFeatureEntries(size_t* count) { |
| 3277 *count = arraysize(kFeatureEntries); | 3301 *count = arraysize(kFeatureEntries); |
| 3278 return kFeatureEntries; | 3302 return kFeatureEntries; |
| 3279 } | 3303 } |
| 3280 | 3304 |
| 3281 } // namespace testing | 3305 } // namespace testing |
| 3282 | 3306 |
| 3283 } // namespace about_flags | 3307 } // namespace about_flags |
| OLD | NEW |