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

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

Issue 2714723002: Add feature for condensed NTP tiles. (Closed)
Patch Set: Rebase. Address comments from asvitkine. 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
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 arraysize(kNTPSnippetsFeatureVariationChromeReader), nullptr}, 578 arraysize(kNTPSnippetsFeatureVariationChromeReader), nullptr},
579 {"via content suggestion server (backed by ChromeReader)", 579 {"via content suggestion server (backed by ChromeReader)",
580 kNTPSnippetsFeatureVariationServer, 580 kNTPSnippetsFeatureVariationServer,
581 arraysize(kNTPSnippetsFeatureVariationServer), nullptr}, 581 arraysize(kNTPSnippetsFeatureVariationServer), nullptr},
582 {"via content suggestion server (backed by Google Now)", 582 {"via content suggestion server (backed by Google Now)",
583 kNTPSnippetsFeatureVariationServer, 583 kNTPSnippetsFeatureVariationServer,
584 arraysize(kNTPSnippetsFeatureVariationServer), "3313279"}}; 584 arraysize(kNTPSnippetsFeatureVariationServer), "3313279"}};
585 #endif // OS_ANDROID 585 #endif // OS_ANDROID
586 586
587 #if defined(OS_ANDROID) 587 #if defined(OS_ANDROID)
588 const FeatureEntry::FeatureParam
589 kNTPCondensedTileLayoutForSmallScreensEnabled[] = {
590 {"ntp_condensed_tile_layout_for_small_screens_enabled", "true"}};
591
592 const FeatureEntry::FeatureParam
593 kNTPCondensedTileLayoutForLargeScreensEnabled[] = {
594 {"ntp_condensed_tile_layout_for_large_screens_enabled", "true"}};
595
596 const FeatureEntry::FeatureVariation
597 kNTPCondensedTileLayoutFeatureVariations[] = {
598 {"(small screens)", kNTPCondensedTileLayoutForSmallScreensEnabled,
599 arraysize(kNTPCondensedTileLayoutForSmallScreensEnabled), nullptr},
600 {"(large screens)", kNTPCondensedTileLayoutForLargeScreensEnabled,
601 arraysize(kNTPCondensedTileLayoutForLargeScreensEnabled), nullptr}};
602 #endif // OS_ANDROID
603
604 #if defined(OS_ANDROID)
588 const FeatureEntry::Choice kUpdateMenuItemSummaryChoices[] = { 605 const FeatureEntry::Choice kUpdateMenuItemSummaryChoices[] = {
589 {IDS_FLAGS_UPDATE_MENU_ITEM_NO_SUMMARY, "", ""}, 606 {IDS_FLAGS_UPDATE_MENU_ITEM_NO_SUMMARY, "", ""},
590 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY, 607 {IDS_FLAGS_UPDATE_MENU_ITEM_DEFAULT_SUMMARY,
591 switches::kForceShowUpdateMenuItemSummary, ""}, 608 switches::kForceShowUpdateMenuItemSummary, ""},
592 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY, 609 {IDS_FLAGS_UPDATE_MENU_ITEM_NEW_FEATURES_SUMMARY,
593 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""}, 610 switches::kForceShowUpdateMenuItemNewFeaturesSummary, ""},
594 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY, 611 {IDS_FLAGS_UPDATE_MENU_ITEM_CUSTOM_SUMMARY,
595 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"}, 612 switches::kForceShowUpdateMenuItemCustomSummary, "Custom summary"},
596 }; 613 };
597 #endif // OS_ANDROID 614 #endif // OS_ANDROID
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 {"enable-ntp-suggestions-notifications", 1958 {"enable-ntp-suggestions-notifications",
1942 IDS_FLAGS_ENABLE_NTP_SUGGESTIONS_NOTIFICATIONS_NAME, 1959 IDS_FLAGS_ENABLE_NTP_SUGGESTIONS_NOTIFICATIONS_NAME,
1943 IDS_FLAGS_ENABLE_NTP_SUGGESTIONS_NOTIFICATIONS_DESCRIPTION, kOsAndroid, 1960 IDS_FLAGS_ENABLE_NTP_SUGGESTIONS_NOTIFICATIONS_DESCRIPTION, kOsAndroid,
1944 FEATURE_WITH_VARIATIONS_VALUE_TYPE( 1961 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1945 params::ntp_snippets::kNotificationsFeature, 1962 params::ntp_snippets::kNotificationsFeature,
1946 kContentSuggestionsNotificationsFeatureVariations, 1963 kContentSuggestionsNotificationsFeatureVariations,
1947 ntp_snippets::kStudyName)}, 1964 ntp_snippets::kStudyName)},
1948 {"ntp-condensed-layout", IDS_FLAGS_NTP_CONDENSED_LAYOUT_NAME, 1965 {"ntp-condensed-layout", IDS_FLAGS_NTP_CONDENSED_LAYOUT_NAME,
1949 IDS_FLAGS_NTP_CONDENSED_LAYOUT_DESCRIPTION, kOsAndroid, 1966 IDS_FLAGS_NTP_CONDENSED_LAYOUT_DESCRIPTION, kOsAndroid,
1950 FEATURE_VALUE_TYPE(chrome::android::kNTPCondensedLayoutFeature)}, 1967 FEATURE_VALUE_TYPE(chrome::android::kNTPCondensedLayoutFeature)},
1968 {"ntp-condensed-tile-layout", IDS_FLAGS_NTP_CONDENSED_TILE_LAYOUT_NAME,
1969 IDS_FLAGS_NTP_CONDENSED_TILE_LAYOUT_DESCRIPTION, kOsAndroid,
1970 FEATURE_WITH_VARIATIONS_VALUE_TYPE(
1971 chrome::android::kNTPCondensedTileLayoutFeature,
1972 kNTPCondensedTileLayoutFeatureVariations,
1973 ntp_snippets::kStudyName)},
1951 {"ntp-google-g-in-omnibox", IDS_FLAGS_NTP_GOOGLE_G_IN_OMNIBOX_NAME, 1974 {"ntp-google-g-in-omnibox", IDS_FLAGS_NTP_GOOGLE_G_IN_OMNIBOX_NAME,
1952 IDS_FLAGS_NTP_GOOGLE_G_IN_OMNIBOX_DESCRIPTION, kOsAndroid, 1975 IDS_FLAGS_NTP_GOOGLE_G_IN_OMNIBOX_DESCRIPTION, kOsAndroid,
1953 FEATURE_VALUE_TYPE(chrome::android::NTPShowGoogleGInOmniboxFeature)}, 1976 FEATURE_VALUE_TYPE(chrome::android::NTPShowGoogleGInOmniboxFeature)},
1954 #endif // OS_ANDROID 1977 #endif // OS_ANDROID
1955 #if BUILDFLAG(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) && \ 1978 #if BUILDFLAG(ENABLE_WEBRTC) && BUILDFLAG(RTC_USE_H264) && \
1956 !defined(MEDIA_DISABLE_FFMPEG) 1979 !defined(MEDIA_DISABLE_FFMPEG)
1957 {"enable-webrtc-h264-with-openh264-ffmpeg", 1980 {"enable-webrtc-h264-with-openh264-ffmpeg",
1958 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_NAME, 1981 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_NAME,
1959 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_DESCRIPTION, kOsDesktop, 1982 IDS_FLAGS_WEBRTC_H264_WITH_OPENH264_FFMPEG_DESCRIPTION, kOsDesktop,
1960 FEATURE_VALUE_TYPE(content::kWebRtcH264WithOpenH264FFmpeg)}, 1983 FEATURE_VALUE_TYPE(content::kWebRtcH264WithOpenH264FFmpeg)},
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2540 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2518 2541
2519 const FeatureEntry* GetFeatureEntries(size_t* count) { 2542 const FeatureEntry* GetFeatureEntries(size_t* count) {
2520 *count = arraysize(kFeatureEntries); 2543 *count = arraysize(kFeatureEntries);
2521 return kFeatureEntries; 2544 return kFeatureEntries;
2522 } 2545 }
2523 2546
2524 } // namespace testing 2547 } // namespace testing
2525 2548
2526 } // namespace about_flags 2549 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698