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

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

Issue 2696563002: [NTP::SectionOrder] Add EM oriented order. (Closed)
Patch Set: Created 3 years, 10 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 "disabled"}, 491 "disabled"},
492 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL, 492 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_URL,
493 switches::kNtpSwitchToExistingTab, "url"}, 493 switches::kNtpSwitchToExistingTab, "url"},
494 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST, 494 {IDS_FLAGS_NTP_SWITCH_TO_EXISTING_TAB_MATCH_HOST,
495 switches::kNtpSwitchToExistingTab, "host"}, 495 switches::kNtpSwitchToExistingTab, "host"},
496 }; 496 };
497 #endif // OS_ANDROID 497 #endif // OS_ANDROID
498 498
499 #if defined(OS_ANDROID) 499 #if defined(OS_ANDROID)
500 const FeatureEntry::FeatureParam 500 const FeatureEntry::FeatureParam
501 kContentSuggestionsCategoryOrderFeatureVariationGeneral[] = {
502 {ntp_snippets::kCategoryOrderParameter,
503 ntp_snippets::kCategoryOrderGeneral},
504 };
505
506 const FeatureEntry::FeatureParam
507 kContentSuggestionsCategoryOrderFeatureVariationEmergingMarketsOriented[] =
508 {
Marc Treib 2017/02/13 14:25:22 Is this "git cl format"ted? Looks weird...
vitaliii 2017/02/14 09:32:32 Yes, it is. If you write this definition as one li
509 {ntp_snippets::kCategoryOrderParameter,
510 ntp_snippets::kCategoryOrderEmergingMarketsOriented},
511 };
512
513 const FeatureEntry::FeatureVariation
514 kContentSuggestionsCategoryOrderFeatureVariations[] = {
515 {"(general)", kContentSuggestionsCategoryOrderFeatureVariationGeneral,
516 arraysize(kContentSuggestionsCategoryOrderFeatureVariationGeneral),
517 nullptr},
518 {"(emerging markets oriented)",
519 kContentSuggestionsCategoryOrderFeatureVariationEmergingMarketsOriented ,
520 arraysize(
521 kContentSuggestionsCategoryOrderFeatureVariationEmergingMarketsOrie nted),
vitaliii 2017/02/13 13:51:57 Should I replace EmergingMarkets with EM in order
Marc Treib 2017/02/13 14:25:22 Sure, why not
vitaliii 2017/02/14 09:32:31 Done.
522 nullptr}};
523
524 const FeatureEntry::FeatureParam
501 kContentSuggestionsCategoryRankerFeatureVariationConstant[] = { 525 kContentSuggestionsCategoryRankerFeatureVariationConstant[] = {
502 {ntp_snippets::kCategoryRankerParameter, 526 {ntp_snippets::kCategoryRankerParameter,
503 ntp_snippets::kCategoryRankerConstantRanker}, 527 ntp_snippets::kCategoryRankerConstantRanker},
504 }; 528 };
505 529
506 const FeatureEntry::FeatureParam 530 const FeatureEntry::FeatureParam
507 kContentSuggestionsCategoryRankerFeatureVariationClickBased[] = { 531 kContentSuggestionsCategoryRankerFeatureVariationClickBased[] = {
508 {ntp_snippets::kCategoryRankerParameter, 532 {ntp_snippets::kCategoryRankerParameter,
509 ntp_snippets::kCategoryRankerClickBasedRanker}, 533 ntp_snippets::kCategoryRankerClickBasedRanker},
510 }; 534 };
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 {"disable-audio-support-for-desktop-share", 1837 {"disable-audio-support-for-desktop-share",
1814 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE, 1838 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE,
1815 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll, 1839 IDS_FLAG_DISABLE_AUDIO_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll,
1816 SINGLE_VALUE_TYPE(switches::kDisableAudioSupportForDesktopShare)}, 1840 SINGLE_VALUE_TYPE(switches::kDisableAudioSupportForDesktopShare)},
1817 #if BUILDFLAG(ENABLE_EXTENSIONS) 1841 #if BUILDFLAG(ENABLE_EXTENSIONS)
1818 {"tab-for-desktop-share", IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE, 1842 {"tab-for-desktop-share", IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE,
1819 IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll, 1843 IDS_FLAG_DISABLE_TAB_FOR_DESKTOP_SHARE_DESCRIPTION, kOsAll,
1820 SINGLE_VALUE_TYPE(extensions::switches::kDisableTabForDesktopShare)}, 1844 SINGLE_VALUE_TYPE(extensions::switches::kDisableTabForDesktopShare)},
1821 #endif // ENABLE_EXTENSIONS 1845 #endif // ENABLE_EXTENSIONS
1822 #if defined(OS_ANDROID) 1846 #if defined(OS_ANDROID)
1847 // TODO(crbug.com/690450): Use ntp_snippets::kStudyName as a feature trial.
Marc Treib 2017/02/13 14:25:22 FYI: The common format (everywhere except for ios/
vitaliii 2017/02/14 09:32:32 Done. Replaced. Also moved the bug ling inside th
1848 // Currently only one FEATURE_WITH_VARIATIONS_VALUE_TYPE can be set via
1849 // about::flags if they reuse a feature trial.
Marc Treib 2017/02/13 14:25:23 Currently, only a single FEATURE_WITH_VARIATIONS_V
vitaliii 2017/02/14 09:32:32 Done.
1850 {"content-suggestions-category-order",
1851 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_ORDER_NAME,
1852 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_ORDER_DESCRIPTION, kOsAndroid,
1853 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1854 ntp_snippets::kCategoryOrder,
1855 kContentSuggestionsCategoryOrderFeatureVariations,
1856 "content-suggestions-category-order-feature-trial")},
1823 {"content-suggestions-category-ranker", 1857 {"content-suggestions-category-ranker",
1824 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_NAME, 1858 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_NAME,
1825 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_DESCRIPTION, kOsAndroid, 1859 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_DESCRIPTION, kOsAndroid,
1826 FEATURE_WITH_VARIATIONS_VALUE_TYPE( 1860 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1827 ntp_snippets::kCategoryRanker, 1861 ntp_snippets::kCategoryRanker,
1828 kContentSuggestionsCategoryRankerFeatureVariations, 1862 kContentSuggestionsCategoryRankerFeatureVariations,
1829 ntp_snippets::kStudyName)}, 1863 ntp_snippets::kStudyName)},
1830 {"override-ntp-suggestions-source", IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_NAME, 1864 {"override-ntp-suggestions-source", IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_NAME,
1831 IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_DESCRIPTION, kOsAndroid, 1865 IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_DESCRIPTION, kOsAndroid,
1832 FEATURE_WITH_VARIATIONS_VALUE_TYPE(ntp_snippets::kContentSuggestionsSource, 1866 FEATURE_WITH_VARIATIONS_VALUE_TYPE(ntp_snippets::kContentSuggestionsSource,
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2444 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2411 2445
2412 const FeatureEntry* GetFeatureEntries(size_t* count) { 2446 const FeatureEntry* GetFeatureEntries(size_t* count) {
2413 *count = arraysize(kFeatureEntries); 2447 *count = arraysize(kFeatureEntries);
2414 return kFeatureEntries; 2448 return kFeatureEntries;
2415 } 2449 }
2416 2450
2417 } // namespace testing 2451 } // namespace testing
2418 2452
2419 } // namespace about_flags 2453 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698