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

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: 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
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();
mohsen 2013/01/03 15:20:28 The following part is to add the ability to set in
- 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));
rjkroege 2013/01/03 22:42:49 the type conversion would happen implicitly? Is th
mohsen 2013/01/04 16:14:22 The main reason is that I wrote this code similar
+ break;
+ case base::Value::TYPE_DOUBLE:
+ prefs->SetDouble(pref_name.c_str(), value);
+ break;
+ default:
+ NOTREACHED();
+ }
}

Powered by Google App Engine
This is Rietveld 408576698