fix braces and ternary

This commit is contained in:
Alexander Frick 2024-10-31 04:28:51 -05:00
parent 6742f45137
commit 3b71099571
3 changed files with 20 additions and 14 deletions

View file

@ -36,8 +36,11 @@ ChromeLabsButton::ChromeLabsButton(BrowserView* browser_view,
static const bool disable_thorium_icons =
base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons");
SetVectorIcons(disable_thorium_icons ? kScienceIcon, kScienceIcon
: kScienceThoriumIcon, kScienceThoriumIcon);
if (disable_thorium_icons) {
SetVectorIcons(kScienceIcon, kScienceIcon);
} else {
SetVectorIcons(kScienceThoriumIcon, kScienceThoriumIcon);
}
GetViewAccessibility().SetName(
l10n_util::GetStringUTF16(IDS_ACCNAME_CHROMELABS_BUTTON));

View file

@ -142,8 +142,11 @@ HomeButton::HomeButton(PressedCallback callback, PrefService* prefs)
static const bool disable_thorium_icons =
base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-icons");
SetVectorIcons(disable_thorium_icons ? kNavigateHomeChromeRefreshIcon, kNavigateHomeTouchIcon
: kNavigateHomeChromeRefreshThoriumIcon, kNavigateHomeTouchIcon);
if (disable_thorium_icons) {
SetVectorIcons(kNavigateHomeChromeRefreshIcon, kNavigateHomeTouchIcon);
} else {
SetVectorIcons(kNavigateHomeChromeRefreshThoriumIcon, kNavigateHomeTouchIcon);
}
SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_HOME));
GetViewAccessibility().SetName(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME));

View file

@ -57,27 +57,27 @@ constexpr auto fix_borked_macos_build =
// hints for what optimizations can be applied on a page load.
BASE_FEATURE(kOptimizationHints,
"OptimizationHints",
fix_borked_macos_build;
fix_borked_macos_build);
// Enables fetching from a remote Optimization Guide Service.
BASE_FEATURE(kRemoteOptimizationGuideFetching,
"OptimizationHintsFetching",
fix_borked_macos_build;
fix_borked_macos_build);
BASE_FEATURE(kRemoteOptimizationGuideFetchingAnonymousDataConsent,
"OptimizationHintsFetchingAnonymousDataConsent",
fix_borked_macos_build;
fix_borked_macos_build);
// Enables performance info in the context menu and fetching from a remote
// Optimization Guide Service.
BASE_FEATURE(kContextMenuPerformanceInfoAndRemoteHintFetching,
"ContextMenuPerformanceInfoAndRemoteHintFetching",
fix_borked_macos_build;
fix_borked_macos_build);
// Enables the prediction of optimization targets.
BASE_FEATURE(kOptimizationTargetPrediction,
"OptimizationTargetPrediction",
fix_borked_macos_build;
fix_borked_macos_build);
// Enables the downloading of models.
BASE_FEATURE(kOptimizationGuideModelDownloading,
@ -115,27 +115,27 @@ BASE_FEATURE(kOverrideNumThreadsForModelExecution,
BASE_FEATURE(kOptGuideEnableXNNPACKDelegateWithTFLite,
"OptGuideEnableXNNPACKDelegateWithTFLite",
fix_borked_macos_build;
fix_borked_macos_build);
BASE_FEATURE(kOptimizationHintsComponent,
"OptimizationHintsComponent",
fix_borked_macos_build;
fix_borked_macos_build);
// Killswitch for fetching on search results from a remote Optimization Guide
// Service.
BASE_FEATURE(kOptimizationGuideFetchingForSRP,
"OptimizationHintsFetchingSRP",
fix_borked_macos_build;
fix_borked_macos_build);
// Kill switch for disabling model quality logging.
BASE_FEATURE(kModelQualityLogging,
"ModelQualityLogging",
fix_borked_macos_build;
fix_borked_macos_build);
// Enables fetching personalized metadata from Optimization Guide Service.
BASE_FEATURE(kOptimizationGuidePersonalizedFetching,
"OptimizationPersonalizedHintsFetching",
fix_borked_macos_build;
fix_borked_macos_build);
// An emergency kill switch feature to stop serving certain model versions per
// optimization target. This is useful in exceptional situations when a bad