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

Unified Diff: chrome/browser/ui/webui/gesture_config_ui.cc

Issue 11745006: Added TapSuppressionController params to gesture configurations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed TSC command line parameters Created 7 years, 12 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/ui/gesture_prefs_observer_factory_aura.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/gesture_config_ui.cc
diff --git a/chrome/browser/ui/webui/gesture_config_ui.cc b/chrome/browser/ui/webui/gesture_config_ui.cc
index 8f90f0dc53c2cbe7f90b37ff7998ac0a5118a967..6797789ad415568c706e8da56571e473b2f090f2 100644
--- a/chrome/browser/ui/webui/gesture_config_ui.cc
+++ b/chrome/browser/ui/webui/gesture_config_ui.cc
@@ -108,6 +108,17 @@ void GestureConfigUI::SetPreferenceValue(const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
PrefService* prefs = profile->GetPrefs();
- prefs->SetDouble(pref_name.c_str(), value);
+ const PrefService::Preference* pref =
+ prefs->FindPreference(pref_name.c_str());
+ switch (pref->GetType()) {
+ case base::Value::TYPE_INTEGER:
+ prefs->SetInteger(pref_name.c_str(), static_cast<int>(value));
+ break;
+ case base::Value::TYPE_DOUBLE:
+ prefs->SetDouble(pref_name.c_str(), value);
+ break;
+ default:
+ NOTREACHED();
+ }
}
« no previous file with comments | « chrome/browser/ui/gesture_prefs_observer_factory_aura.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698