Chromium Code Reviews| Index: ui/keyboard/keyboard_util.cc |
| diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc |
| index 572aecb92798ad6df80cfabd2c7751ea89042a92..f9b9e5cc9234e6a104534df3aa3581b7766531ff 100644 |
| --- a/ui/keyboard/keyboard_util.cc |
| +++ b/ui/keyboard/keyboard_util.cc |
| @@ -184,10 +184,13 @@ bool IsFloatingVirtualKeyboardEnabled() { |
| } |
| bool IsGestureTypingEnabled() { |
| - std::string keyboard_switch = |
| - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| - switches::kGestureTyping); |
| - return keyboard_switch == switches::kGestureTypingEnabled; |
|
bshe
2015/09/04 14:07:25
perhaps just do:
keyboard_switch != switches::kGes
SteveT
2015/09/04 17:50:13
Oh right, because GetSwitchValueASCII returns "" i
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kGestureTyping)) { |
| + return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| + switches::kGestureTyping) == switches::kGestureTypingEnabled; |
| + } |
| + // Default value if no command line flags specified. |
| + return true; |
| } |
| bool IsGestureEditingEnabled() { |