Index: chrome/common/chrome_switches.cc |
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc |
index ed7586cb2d8e6538a22104a7cfaa34ca506199da..fed9789fdb59eb54ae4bfe3f6512e2924683982a 100644 |
--- a/chrome/common/chrome_switches.cc |
+++ b/chrome/common/chrome_switches.cc |
@@ -599,8 +599,10 @@ const char kEnableSearchButtonInOmniboxForStrOrIip[] = |
// Enables using bubbles for session restore request instead of infobars. |
const char kEnableSessionCrashedBubble[] = "enable-session-crashed-bubble"; |
-// Enable settings in a separate browser window per profile. |
-const char kEnableSettingsWindow[] = "enable-settings-window"; |
+// Enable or disable settings in a separate browser window per profile |
+// (see SettingsWindowEnabled() below). |
+const char kEnableSettingsWindow[] = "enable-settings-window"; |
+const char kDisableSettingsWindow[] = "disable-settings-window"; |
// Enable SPDY/4, aka HTTP/2. This is a temporary testing flag. |
const char kEnableSpdy4[] = "enable-spdy4"; |
@@ -1388,6 +1390,16 @@ const char kDebugPrint[] = "debug-print"; |
const char kFileManagerExtensionPath[] = "filemgr-ext-path"; |
#endif |
+bool SettingsWindowEnabled() { |
+#if defined(OS_CHROMEOS) |
+ return !CommandLine::ForCurrentProcess()->HasSwitch( |
+ ::switches::kDisableSettingsWindow); |
+#else |
+ return CommandLine::ForCurrentProcess()->HasSwitch( |
+ ::switches::kEnableSettingsWindow); |
+#endif |
+} |
+ |
// ----------------------------------------------------------------------------- |
// DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
// |