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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 2947073002: Add chrome://flag to enable the Stale Previews timestamp (Closed)
Patch Set: add params Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 1024
1025 #if defined(OS_ANDROID) 1025 #if defined(OS_ANDROID)
1026 const FeatureEntry::FeatureParam kPersistentMenuItemEnabled[] = { 1026 const FeatureEntry::FeatureParam kPersistentMenuItemEnabled[] = {
1027 {"persistent_menu_item_enabled", "true"}}; 1027 {"persistent_menu_item_enabled", "true"}};
1028 1028
1029 const FeatureEntry::FeatureVariation kDataReductionMainMenuFeatureVariations[] = 1029 const FeatureEntry::FeatureVariation kDataReductionMainMenuFeatureVariations[] =
1030 {{"(persistent)", kPersistentMenuItemEnabled, 1030 {{"(persistent)", kPersistentMenuItemEnabled,
1031 arraysize(kPersistentMenuItemEnabled), nullptr}}; 1031 arraysize(kPersistentMenuItemEnabled), nullptr}};
1032 #endif // OS_ANDROID 1032 #endif // OS_ANDROID
1033 1033
1034 const FeatureEntry::FeatureParam kStalePreviewsTimestampParams[] = {
1035 {"min_staleness_in_minutes", "2"},
1036 {"max_staleness_in_minutes", "1440"}};
1037
1038 const FeatureEntry::FeatureVariation
1039 kStalePreviewsTimestampFeatureVariations[] = {
1040 {"(with staleness params)", kStalePreviewsTimestampParams,
1041 arraysize(kStalePreviewsTimestampParams), nullptr}};
1042
1034 const FeatureEntry::Choice kEnableHeapProfilingChoices[] = { 1043 const FeatureEntry::Choice kEnableHeapProfilingChoices[] = {
1035 {flags_ui::kGenericExperimentChoiceDisabled, "", ""}, 1044 {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
1036 {flag_descriptions::kEnableHeapProfilingModePseudo, 1045 {flag_descriptions::kEnableHeapProfilingModePseudo,
1037 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo}, 1046 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo},
1038 {flag_descriptions::kEnableHeapProfilingModeNative, 1047 {flag_descriptions::kEnableHeapProfilingModeNative,
1039 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative}, 1048 switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative},
1040 {flag_descriptions::kEnableHeapProfilingTaskProfiler, 1049 {flag_descriptions::kEnableHeapProfilingTaskProfiler,
1041 switches::kEnableHeapProfiling, 1050 switches::kEnableHeapProfiling,
1042 switches::kEnableHeapProfilingTaskProfiler}}; 1051 switches::kEnableHeapProfilingTaskProfiler}};
1043 1052
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 #endif // OS_MACOSX 1958 #endif // OS_MACOSX
1950 {"data-reduction-proxy-lo-fi", 1959 {"data-reduction-proxy-lo-fi",
1951 flag_descriptions::kDataReductionProxyLoFiName, 1960 flag_descriptions::kDataReductionProxyLoFiName,
1952 flag_descriptions::kDataReductionProxyLoFiDescription, kOsAll, 1961 flag_descriptions::kDataReductionProxyLoFiDescription, kOsAll,
1953 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices)}, 1962 MULTI_VALUE_TYPE(kDataReductionProxyLoFiChoices)},
1954 {"enable-data-reduction-proxy-lite-page", 1963 {"enable-data-reduction-proxy-lite-page",
1955 flag_descriptions::kEnableDataReductionProxyLitePageName, 1964 flag_descriptions::kEnableDataReductionProxyLitePageName,
1956 flag_descriptions::kEnableDataReductionProxyLitePageDescription, kOsAll, 1965 flag_descriptions::kEnableDataReductionProxyLitePageDescription, kOsAll,
1957 SINGLE_VALUE_TYPE( 1966 SINGLE_VALUE_TYPE(
1958 data_reduction_proxy::switches::kEnableDataReductionProxyLitePage)}, 1967 data_reduction_proxy::switches::kEnableDataReductionProxyLitePage)},
1968 {"enable-stale-previews-timestamp",
1969 flag_descriptions::kEnableStalePreviewsName,
1970 flag_descriptions::kEnableStalePreviewsDescription, kOsAll,
1971 FEATURE_WITH_PARAMS_VALUE_TYPE(previews::features::kStalePreviewsTimestamp,
megjablon 2017/06/21 00:25:07 Is there any way to add the params for a feature u
Alexei Svitkine (slow) 2017/06/22 16:29:21 Can you simply specify default values for params i
megjablon 2017/06/22 20:43:22 Done.
1972 kStalePreviewsTimestampFeatureVariations,
1973 "StalePreviewsTimestamp")},
1959 {"enable-data-reduction-proxy-server-experiment", 1974 {"enable-data-reduction-proxy-server-experiment",
1960 flag_descriptions::kEnableDataReductionProxyServerExperimentName, 1975 flag_descriptions::kEnableDataReductionProxyServerExperimentName,
1961 flag_descriptions::kEnableDataReductionProxyServerExperimentDescription, 1976 flag_descriptions::kEnableDataReductionProxyServerExperimentDescription,
1962 kOsAll, MULTI_VALUE_TYPE(kDataReductionProxyServerExperiment)}, 1977 kOsAll, MULTI_VALUE_TYPE(kDataReductionProxyServerExperiment)},
1963 #if defined(OS_ANDROID) 1978 #if defined(OS_ANDROID)
1964 {"enable-data-reduction-proxy-savings-promo", 1979 {"enable-data-reduction-proxy-savings-promo",
1965 flag_descriptions::kEnableDataReductionProxySavingsPromoName, 1980 flag_descriptions::kEnableDataReductionProxySavingsPromoName,
1966 flag_descriptions::kEnableDataReductionProxySavingsPromoDescription, 1981 flag_descriptions::kEnableDataReductionProxySavingsPromoDescription,
1967 kOsAndroid, 1982 kOsAndroid,
1968 SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: 1983 SINGLE_VALUE_TYPE(data_reduction_proxy::switches::
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3313 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 3328 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
3314 3329
3315 const FeatureEntry* GetFeatureEntries(size_t* count) { 3330 const FeatureEntry* GetFeatureEntries(size_t* count) {
3316 *count = arraysize(kFeatureEntries); 3331 *count = arraysize(kFeatureEntries);
3317 return kFeatureEntries; 3332 return kFeatureEntries;
3318 } 3333 }
3319 3334
3320 } // namespace testing 3335 } // namespace testing
3321 3336
3322 } // namespace about_flags 3337 } // namespace about_flags
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698