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

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

Issue 2705373004: [Remote suggestions] Add a remote suggestions flag to choose the source (Closed)
Patch Set: Add the other flag Created 3 years, 9 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 | « chrome/app/generated_resources.grd ('k') | components/ntp_snippets/features.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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 const FeatureEntry::FeatureVariation 555 const FeatureEntry::FeatureVariation
556 kContentSuggestionsNotificationsFeatureVariations[] = { 556 kContentSuggestionsNotificationsFeatureVariations[] = {
557 {"(notify always)", 557 {"(notify always)",
558 kContentSuggestionsNotificationsFeatureVariationAlways, 558 kContentSuggestionsNotificationsFeatureVariationAlways,
559 arraysize(kContentSuggestionsNotificationsFeatureVariationAlways), 559 arraysize(kContentSuggestionsNotificationsFeatureVariationAlways),
560 nullptr}}; 560 nullptr}};
561 #endif // OS_ANDROID 561 #endif // OS_ANDROID
562 562
563 #if defined(OS_ANDROID) 563 #if defined(OS_ANDROID)
564 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationChromeReader[] = { 564 const FeatureEntry::FeatureParam
565 {"content_suggestions_backend", ntp_snippets::kChromeReaderServer}}; 565 kRemoteSuggestionsFeatureVariationContentSuggestionsServer[] = {
566 {"content_suggestions_backend",
567 ntp_snippets::kContentSuggestionsServer}};
566 568
567 const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationServer[] = { 569 const FeatureEntry::FeatureVariation kRemoteSuggestionsFeatureVariations[] = {
568 {"content_suggestions_backend",
569 ntp_snippets::kContentSuggestionsServer}};
570
571 const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = {
572 {"via ChromeReader", kNTPSnippetsFeatureVariationChromeReader,
573 arraysize(kNTPSnippetsFeatureVariationChromeReader), nullptr},
574 {"via content suggestion server (backed by ChromeReader)", 570 {"via content suggestion server (backed by ChromeReader)",
575 kNTPSnippetsFeatureVariationServer, 571 kRemoteSuggestionsFeatureVariationContentSuggestionsServer,
576 arraysize(kNTPSnippetsFeatureVariationServer), nullptr}, 572 arraysize(kRemoteSuggestionsFeatureVariationContentSuggestionsServer),
573 nullptr},
577 {"via content suggestion server (backed by Google Now)", 574 {"via content suggestion server (backed by Google Now)",
578 kNTPSnippetsFeatureVariationServer, 575 kRemoteSuggestionsFeatureVariationContentSuggestionsServer,
579 arraysize(kNTPSnippetsFeatureVariationServer), "3313279"}}; 576 arraysize(kRemoteSuggestionsFeatureVariationContentSuggestionsServer),
577 "3313279"}};
580 #endif // OS_ANDROID 578 #endif // OS_ANDROID
581 579
582 #if defined(OS_ANDROID) 580 #if defined(OS_ANDROID)
583 const FeatureEntry::FeatureParam kCondensedTileLayoutForSmallScreensEnabled[] = 581 const FeatureEntry::FeatureParam kCondensedTileLayoutForSmallScreensEnabled[] =
584 {{"condensed_tile_layout_for_small_screens_enabled", "true"}}; 582 {{"condensed_tile_layout_for_small_screens_enabled", "true"}};
585 583
586 const FeatureEntry::FeatureParam kCondensedTileLayoutForLargeScreensEnabled[] = 584 const FeatureEntry::FeatureParam kCondensedTileLayoutForLargeScreensEnabled[] =
587 {{"condensed_tile_layout_for_large_screens_enabled", "true"}}; 585 {{"condensed_tile_layout_for_large_screens_enabled", "true"}};
588 586
589 const FeatureEntry::FeatureVariation 587 const FeatureEntry::FeatureVariation
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 ntp_snippets::kCategoryOrder, 1877 ntp_snippets::kCategoryOrder,
1880 kContentSuggestionsCategoryOrderFeatureVariations, 1878 kContentSuggestionsCategoryOrderFeatureVariations,
1881 ntp_snippets::kStudyName)}, 1879 ntp_snippets::kStudyName)},
1882 {"content-suggestions-category-ranker", 1880 {"content-suggestions-category-ranker",
1883 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_NAME, 1881 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_NAME,
1884 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_DESCRIPTION, kOsAndroid, 1882 IDS_FLAGS_CONTENT_SUGGESTIONS_CATEGORY_RANKER_DESCRIPTION, kOsAndroid,
1885 FEATURE_WITH_VARIATIONS_VALUE_TYPE( 1883 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1886 ntp_snippets::kCategoryRanker, 1884 ntp_snippets::kCategoryRanker,
1887 kContentSuggestionsCategoryRankerFeatureVariations, 1885 kContentSuggestionsCategoryRankerFeatureVariations,
1888 ntp_snippets::kStudyName)}, 1886 ntp_snippets::kStudyName)},
1889 {"override-ntp-suggestions-source", IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_NAME,
1890 IDS_FLAGS_OVERRIDE_SNIPPETS_SOURCE_DESCRIPTION, kOsAndroid,
1891 FEATURE_WITH_VARIATIONS_VALUE_TYPE(ntp_snippets::kContentSuggestionsSource,
1892 kNTPSnippetsFeatureVariations,
1893 ntp_snippets::kStudyName)},
1894 {"enable-ntp-snippets-increased-visibility", 1887 {"enable-ntp-snippets-increased-visibility",
1895 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME, 1888 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_NAME,
1896 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid, 1889 IDS_FLAGS_ENABLE_NTP_SNIPPETS_VISIBILITY_DESCRIPTION, kOsAndroid,
1897 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)}, 1890 FEATURE_VALUE_TYPE(ntp_snippets::kIncreasedVisibility)},
1898 {"enable-ntp-save-to-offline", IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_NAME, 1891 {"enable-ntp-save-to-offline", IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_NAME,
1899 IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_DESCRIPTION, kOsAndroid, 1892 IDS_FLAGS_ENABLE_NTP_SAVE_TO_OFFLINE_DESCRIPTION, kOsAndroid,
1900 FEATURE_VALUE_TYPE(ntp_snippets::kSaveToOfflineFeature)}, 1893 FEATURE_VALUE_TYPE(ntp_snippets::kSaveToOfflineFeature)},
1901 {"enable-ntp-offline-badge", IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_NAME, 1894 {"enable-ntp-offline-badge", IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_NAME,
1902 IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_DESCRIPTION, kOsAndroid, 1895 IDS_FLAGS_ENABLE_NTP_OFFLINE_BADGE_DESCRIPTION, kOsAndroid,
1903 FEATURE_VALUE_TYPE(ntp_snippets::kOfflineBadgeFeature)}, 1896 FEATURE_VALUE_TYPE(ntp_snippets::kOfflineBadgeFeature)},
1897 {"enable-ntp-remote-suggestions",
1898 IDS_FLAGS_ENABLE_NTP_REMOTE_SUGGESTIONS_NAME,
1899 IDS_FLAGS_ENABLE_NTP_REMOTE_SUGGESTIONS_DESCRIPTION, kOsAndroid,
1900 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1901 ntp_snippets::kArticleSuggestionsFeature,
1902 kRemoteSuggestionsFeatureVariations,
1903 ntp_snippets::kStudyName)},
1904 {"enable-ntp-recent-offline-tab-suggestions", 1904 {"enable-ntp-recent-offline-tab-suggestions",
1905 IDS_FLAGS_ENABLE_NTP_RECENT_OFFLINE_TAB_SUGGESTIONS_NAME, 1905 IDS_FLAGS_ENABLE_NTP_RECENT_OFFLINE_TAB_SUGGESTIONS_NAME,
1906 IDS_FLAGS_ENABLE_NTP_RECENT_OFFLINE_TAB_SUGGESTIONS_DESCRIPTION, 1906 IDS_FLAGS_ENABLE_NTP_RECENT_OFFLINE_TAB_SUGGESTIONS_DESCRIPTION,
1907 kOsAndroid, 1907 kOsAndroid,
1908 FEATURE_VALUE_TYPE(ntp_snippets::kRecentOfflineTabSuggestionsFeature)}, 1908 FEATURE_VALUE_TYPE(ntp_snippets::kRecentOfflineTabSuggestionsFeature)},
1909 {"enable-ntp-asset-download-suggestions", 1909 {"enable-ntp-asset-download-suggestions",
1910 IDS_FLAGS_ENABLE_NTP_ASSET_DOWNLOAD_SUGGESTIONS_NAME, 1910 IDS_FLAGS_ENABLE_NTP_ASSET_DOWNLOAD_SUGGESTIONS_NAME,
1911 IDS_FLAGS_ENABLE_NTP_ASSET_DOWNLOAD_SUGGESTIONS_DESCRIPTION, kOsAndroid, 1911 IDS_FLAGS_ENABLE_NTP_ASSET_DOWNLOAD_SUGGESTIONS_DESCRIPTION, kOsAndroid,
1912 FEATURE_VALUE_TYPE(features::kAssetDownloadSuggestionsFeature)}, 1912 FEATURE_VALUE_TYPE(features::kAssetDownloadSuggestionsFeature)},
1913 {"enable-ntp-offline-page-download-suggestions", 1913 {"enable-ntp-offline-page-download-suggestions",
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2527 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2528 2528
2529 const FeatureEntry* GetFeatureEntries(size_t* count) { 2529 const FeatureEntry* GetFeatureEntries(size_t* count) {
2530 *count = arraysize(kFeatureEntries); 2530 *count = arraysize(kFeatureEntries);
2531 return kFeatureEntries; 2531 return kFeatureEntries;
2532 } 2532 }
2533 2533
2534 } // namespace testing 2534 } // namespace testing
2535 2535
2536 } // namespace about_flags 2536 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | components/ntp_snippets/features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698