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

Unified Diff: ui/keyboard/keyboard_util.cc

Issue 1321543010: Make IsGestureTyping enabled on by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698