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

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

Issue 2595883002: [NTP::SectionOrder] Add a flag to choose category ranker. (Closed)
Patch Set: histograms.xml. Created 3 years, 11 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
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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab, 503 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kNtpSwitchToExistingTab,
504 "disabled"}, 504 "disabled"},
505 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, 505 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL,
506 switches::kNtpSwitchToExistingTab, "url"}, 506 switches::kNtpSwitchToExistingTab, "url"},
507 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, 507 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST,
508 switches::kNtpSwitchToExistingTab, "host"}, 508 switches::kNtpSwitchToExistingTab, "host"},
509 }; 509 };
510 #endif // OS_ANDROID 510 #endif // OS_ANDROID
511 511
512 #if defined(OS_ANDROID) 512 #if defined(OS_ANDROID)
513 const FeatureEntry::FeatureParam
514 kContentSuggestionsCategoryRankerFeatureVariationConstant[] = {
515 {ntp_snippets::kCategoryRankerParameter,
516 ntp_snippets::kCategoryRankerConstantRanker},
517 };
518
519 const FeatureEntry::FeatureParam
520 kContentSuggestionsCategoryRankerFeatureVariationClickBased[] = {
521 {ntp_snippets::kCategoryRankerParameter,
522 ntp_snippets::kCategoryRankerClickBasedRanker},
523 };
524
525 const FeatureEntry::FeatureVariation
526 kContentSuggestionsCategoryRankerFeatureVariations[] = {
527 {"(constant)",
528 kContentSuggestionsCategoryRankerFeatureVariationConstant,
529 arraysize(kContentSuggestionsCategoryRankerFeatureVariationConstant),
530 nullptr},
531 {"(click based)",
532 kContentSuggestionsCategoryRankerFeatureVariationClickBased,
533 arraysize(kContentSuggestionsCategoryRankerFeatureVariationClickBased),
534 nullptr}};
535 #endif // OS_ANDROID
536
537 #if defined(OS_ANDROID)
513 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = { 538 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = {
514 {"fetching_personalization", "personal"}, 539 {"fetching_personalization", "personal"},
515 }; 540 };
516 541
517 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationServer[] = { 542 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationServer[] = {
518 {"content_suggestions_backend", 543 {"content_suggestions_backend",
519 ntp_snippets::kContentSuggestionsServer}}; 544 ntp_snippets::kContentSuggestionsServer}};
520 545
521 const FeatureEntry::FeatureParam 546 const FeatureEntry::FeatureParam
522 kNTPSnippetsFeatureVariationServerNonPersonalized[] = { 547 kNTPSnippetsFeatureVariationServerNonPersonalized[] = {
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 {"disable-audio-support-for-desktop-share", 1857 {"disable-audio-support-for-desktop-share",
1833 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE, 1858 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE,
1834 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll, 1859 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll,
1835 SINGLE_VALUE_TYPE(switches::kDisableAudioSupportForDesktopShare)}, 1860 SINGLE_VALUE_TYPE(switches::kDisableAudioSupportForDesktopShare)},
1836 #if BUILDFLAG(ENABLE_EXTENSIONS) 1861 #if BUILDFLAG(ENABLE_EXTENSIONS)
1837 {"tab-for-desktop-share", IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE, 1862 {"tab-for-desktop-share", IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE,
1838 IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll, 1863 IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll,
1839 SINGLE_VALUE_TYPE(extensions::switches::kDisableTabForDesktopShare)}, 1864 SINGLE_VALUE_TYPE(extensions::switches::kDisableTabForDesktopShare)},
1840 #endif // ENABLE_EXTENSIONS 1865 #endif // ENABLE_EXTENSIONS
1841 #if defined(OS_ANDROID) 1866 #if defined(OS_ANDROID)
1867 {"content-suggestions-category-ranker",
1868 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_NAME,
1869 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_DESCRIPTION, kOsAndroid,
1870 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1871 ntp_snippets::kCategoryRanker,
1872 kContentSuggestionsCategoryRankerFeatureVariations,
1873 ntp_snippets::kStudyName)},
1842 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME, 1874 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME,
1843 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid, 1875 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid,
1844 FEATURE_WITH_VARIATIONS_VALUE_TYPE( 1876 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1845 ntp_snippets::kContentSuggestionsFeature, 1877 ntp_snippets::kContentSuggestionsFeature,
1846 kNTPSnippetsFeatureVariations, 1878 kNTPSnippetsFeatureVariations,
1847 ntp_snippets::kStudyName)}, 1879 ntp_snippets::kStudyName)},
1848 {"enable-ntp-snippets-increased-visibility", 1880 {"enable-ntp-snippets-increased-visibility",
1849 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME, 1881 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME,
1850 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid, 1882 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid,
1851 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)}, 1883 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)},
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 #if !defined(OS_MACOSX) 2100 #if !defined(OS_MACOSX)
2069 {"permission-prompt-persistence-toggle", 2101 {"permission-prompt-persistence-toggle",
2070 IDS_FLAGS_PERMISSION_PROMPT_PERSISTENCE_TOGGLE_NAME, 2102 IDS_FLAGS_PERMISSION_PROMPT_PERSISTENCE_TOGGLE_NAME,
2071 IDS_FLAGS_PERMISSION_PROMPT_PERSISTENCE_TOGGLE_DESCRIPTION, 2103 IDS_FLAGS_PERMISSION_PROMPT_PERSISTENCE_TOGGLE_DESCRIPTION,
2072 kOsWin | kOsCrOS | kOsLinux | kOsAndroid, 2104 kOsWin | kOsCrOS | kOsLinux | kOsAndroid,
2073 FEATURE_VALUE_TYPE( 2105 FEATURE_VALUE_TYPE(
2074 features::kDisplayPersistenceToggleInPermissionPrompts)}, 2106 features::kDisplayPersistenceToggleInPermissionPrompts)},
2075 #endif 2107 #endif
2076 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) 2108 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
2077 {"print-pdf-as-image", IDS_FLAGS_PRINT_PDF_AS_IMAGE_NAME, 2109 {"print-pdf-as-image", IDS_FLAGS_PRINT_PDF_AS_IMAGE_NAME,
2078 IDS_FLAGS_PRINT_PDF_AS_IMAGE_DESCRIPTION, kOsDesktop, 2110 IDS_FLAGS_PRINT_PDF_AS_IMAGE_DESCRIPTION, kOsDesktop,
2079 FEATURE_VALUE_TYPE(features::kPrintPdfAsImage)}, 2111 FEATURE_VALUE_TYPE(features::kPrintPdfAsImage)},
2080 {"print-scaling", IDS_FLAGS_PRINT_SCALING_NAME, 2112 {"print-scaling", IDS_FLAGS_PRINT_SCALING_NAME,
2081 IDS_FLAGS_PRINT_SCALING_DESCRIPTION, kOsDesktop, 2113 IDS_FLAGS_PRINT_SCALING_DESCRIPTION, kOsDesktop,
2082 FEATURE_VALUE_TYPE(features::kPrintScaling)}, 2114 FEATURE_VALUE_TYPE(features::kPrintScaling)},
2083 #endif // !defined(OS_ANDROID) 2115 #endif // !defined(OS_ANDROID)
2084 #if defined(OS_ANDROID) 2116 #if defined(OS_ANDROID)
2085 {"enable-consistent-omnibox-geolocation", 2117 {"enable-consistent-omnibox-geolocation",
2086 IDS_FLAGS_ENABLE_CONSISTENT_OMNIBOX_GEOLOCATION_NAME, 2118 IDS_FLAGS_ENABLE_CONSISTENT_OMNIBOX_GEOLOCATION_NAME,
2087 IDS_FLAGS_ENABLE_CONSISTENT_OMNIBOX_GEOLOCATION_DESCRIPTION, kOsAndroid, 2119 IDS_FLAGS_ENABLE_CONSISTENT_OMNIBOX_GEOLOCATION_DESCRIPTION, kOsAndroid,
2088 FEATURE_VALUE_TYPE(features::kConsistentOmniboxGeolocation)}, 2120 FEATURE_VALUE_TYPE(features::kConsistentOmniboxGeolocation)},
2089 {"concurrent-background-loading-on-svelte", 2121 {"concurrent-background-loading-on-svelte",
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2376 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2345 2377
2346 const FeatureEntry* GetFeatureEntries(size_t* count) { 2378 const FeatureEntry* GetFeatureEntries(size_t* count) {
2347 *count = arraysize(kFeatureEntries); 2379 *count = arraysize(kFeatureEntries);
2348 return kFeatureEntries; 2380 return kFeatureEntries;
2349 } 2381 }
2350 2382
2351 } // namespace testing 2383 } // namespace testing
2352 2384
2353 } // namespace about_flags 2385 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ntp_snippets/content_suggestions_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698