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

Unified Diff: chrome/browser/cocoa/preferences_window_controller.mm

Issue 3246004: Hide mac background mode prefs ui if background mode is not enabled. (Closed)
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/preferences_window_controller.mm
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm
index c382603ad4adcad75ba94c2cbbd8d90023beb9e4..7c62797454782916356a415ce4befa802bf82650 100644
--- a/chrome/browser/cocoa/preferences_window_controller.mm
+++ b/chrome/browser/cocoa/preferences_window_controller.mm
@@ -534,6 +534,15 @@ class ManagedPrefsBannerState : public ManagedPrefsBannerBase {
RemoveViewFromView(underTheHoodContentView_, enableLoggingCheckbox_);
#endif // !defined(GOOGLE_CHROME_BUILD)
+ // If BackgroundMode is not enabled, hide the related prefs UI.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBackgroundMode)) {
+ RemoveViewFromView(underTheHoodContentView_, backgroundModeTitle_);
+ RemoveViewFromView(underTheHoodContentView_, backgroundModeCheckbox_);
+ RemoveViewFromView(underTheHoodContentView_, backgroundModeDescription_);
+ RemoveViewFromView(underTheHoodContentView_, backgroundModeLearnMore_);
+ }
+
// There are four problem children within the groups:
// Basics - Default Browser
// Personal Stuff - Sync
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698