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

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

Issue 2595883002: [NTP::SectionOrder] Add a flag to choose category ranker. (Closed)
Patch Set: jkrcal@ nit. Created 4 years 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 kNTPSnippetsCategoryRankerFeatureVariationConstant[] = {
515 {ntp_snippets::kCategoryRankerParameter,
516 ntp_snippets::kCategoryRankerConstantRanker},
517 };
518
519 const FeatureEntry::FeatureParam
520 kNTPSnippetsCategoryRankerFeatureVariationClickBased[] = {
521 {ntp_snippets::kCategoryRankerParameter,
522 ntp_snippets::kCategoryRankerClickBasedRanker},
523 };
524
525 const FeatureEntry::FeatureVariation
526 kNTPSnippetsCategoryRankerFeatureVariations[] = {
527 {"(constant)", kNTPSnippetsCategoryRankerFeatureVariationConstant,
528 arraysize(kNTPSnippetsCategoryRankerFeatureVariationConstant),
529 nullptr},
530 {"(click based)", kNTPSnippetsCategoryRankerFeatureVariationClickBased,
531 arraysize(kNTPSnippetsCategoryRankerFeatureVariationClickBased),
532 nullptr}};
533 #endif // OS_ANDROID
534
535 #if defined(OS_ANDROID)
513 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = { 536 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = {
514 {"fetching_personalization", "personal"}, 537 {"fetching_personalization", "personal"},
515 }; 538 };
516 539
517 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationServer[] = { 540 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationServer[] = {
518 {"content_suggestions_backend", 541 {"content_suggestions_backend",
519 ntp_snippets::kContentSuggestionsServer}}; 542 ntp_snippets::kContentSuggestionsServer}};
520 543
521 const FeatureEntry::FeatureParam 544 const FeatureEntry::FeatureParam
522 kNTPSnippetsFeatureVariationServerNonPersonalized[] = { 545 kNTPSnippetsFeatureVariationServerNonPersonalized[] = {
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 {"disable-audio-support-for-desktop-share", 1855 {"disable-audio-support-for-desktop-share",
1833 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE, 1856 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE,
1834 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll, 1857 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll,
1835 SINGLE_VALUE_TYPE(switches::kDisableAudioSupportForDesktopShare)}, 1858 SINGLE_VALUE_TYPE(switches::kDisableAudioSupportForDesktopShare)},
1836 #if BUILDFLAG(ENABLE_EXTENSIONS) 1859 #if BUILDFLAG(ENABLE_EXTENSIONS)
1837 {"tab-for-desktop-share", IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE, 1860 {"tab-for-desktop-share", IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE,
1838 IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll, 1861 IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll,
1839 SINGLE_VALUE_TYPE(extensions::switches::kDisableTabForDesktopShare)}, 1862 SINGLE_VALUE_TYPE(extensions::switches::kDisableTabForDesktopShare)},
1840 #endif // ENABLE_EXTENSIONS 1863 #endif // ENABLE_EXTENSIONS
1841 #if defined(OS_ANDROID) 1864 #if defined(OS_ANDROID)
1865 {"ntp-category-ranker", IDS_FLAGS_NTP_CATEGORY_RANKER_NAME,
1866 IDS_FLAGS_NTP_CATEGORY_RANKER_DESCRIPTION, kOsAndroid,
1867 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1868 ntp_snippets::kCategoryRanker,
1869 kNTPSnippetsCategoryRankerFeatureVariations,
1870 ntp_snippets::kStudyName)},
1842 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME, 1871 {"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME,
1843 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid, 1872 IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid,
1844 FEATURE_WITH_VARIATIONS_VALUE_TYPE( 1873 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1845 ntp_snippets::kContentSuggestionsFeature, 1874 ntp_snippets::kContentSuggestionsFeature,
1846 kNTPSnippetsFeatureVariations, 1875 kNTPSnippetsFeatureVariations,
1847 ntp_snippets::kStudyName)}, 1876 ntp_snippets::kStudyName)},
1848 {"enable-ntp-snippets-increased-visibility", 1877 {"enable-ntp-snippets-increased-visibility",
1849 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME, 1878 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME,
1850 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid, 1879 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid,
1851 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)}, 1880 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)},
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2370 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2342 2371
2343 const FeatureEntry* GetFeatureEntries(size_t* count) { 2372 const FeatureEntry* GetFeatureEntries(size_t* count) {
2344 *count = arraysize(kFeatureEntries); 2373 *count = arraysize(kFeatureEntries);
2345 return kFeatureEntries; 2374 return kFeatureEntries;
2346 } 2375 }
2347 2376
2348 } // namespace testing 2377 } // namespace testing
2349 2378
2350 } // namespace about_flags 2379 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698