Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index 52c860ddd1979a8c09f76057b4d2185a9b9f7255..e4727df4649786620c927c0edd30b9e6995cf851 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -1316,11 +1316,12 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunInternal() { |
#endif |
#if defined(TOUCH_UI) |
- // Always add the --views-desktop flag. If the user disabled the flag from |
- // about:flags, it will get unset bt the call to ConvertFlagsToSwitches in the |
- // following line. |
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, |
- "other"); |
+ // Always add the --views-desktop flag, if not already set. |
+ // If the user disabled the flag from about:flags, it will get unset by the |
+ // call to ConvertFlagsToSwitches in the following line. |
+ if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) |
+ CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, |
+ "other"); |
#endif |
// Convert active labs into switches. Modifies the current command line. |