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

Side by Side Diff: chrome/browser/chromeos/preferences.cc

Issue 9250023: Support for mousecontrol script (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 if (!pref_name || *pref_name == prefs::kTapToClickEnabled) { 313 if (!pref_name || *pref_name == prefs::kTapToClickEnabled) {
314 bool enabled = tap_to_click_enabled_.GetValue(); 314 bool enabled = tap_to_click_enabled_.GetValue();
315 system::touchpad_settings::SetTapToClick(enabled); 315 system::touchpad_settings::SetTapToClick(enabled);
316 if (pref_name) 316 if (pref_name)
317 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Changed", enabled); 317 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Changed", enabled);
318 else 318 else
319 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Started", enabled); 319 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Started", enabled);
320 } 320 }
321 if (!pref_name || *pref_name == prefs::kTouchpadSensitivity) { 321 if (!pref_name || *pref_name == prefs::kTouchpadSensitivity) {
322 int sensitivity = sensitivity_.GetValue(); 322 int sensitivity = sensitivity_.GetValue();
323 system::touchpad_settings::SetSensitivity(sensitivity); 323 system::pointer_settings::SetSensitivity(sensitivity);
324 if (pref_name) { 324 if (pref_name) {
325 UMA_HISTOGRAM_CUSTOM_COUNTS( 325 UMA_HISTOGRAM_CUSTOM_COUNTS(
326 "Touchpad.Sensitivity.Changed", sensitivity, 1, 5, 5); 326 "Touchpad.Sensitivity.Changed", sensitivity, 1, 5, 5);
327 } else { 327 } else {
328 UMA_HISTOGRAM_CUSTOM_COUNTS( 328 UMA_HISTOGRAM_CUSTOM_COUNTS(
329 "Touchpad.Sensitivity.Started", sensitivity, 1, 5, 5); 329 "Touchpad.Sensitivity.Started", sensitivity, 1, 5, 5);
330 } 330 }
331 } 331 }
332 if (!pref_name || *pref_name == prefs::kPrimaryMouseButtonRight) { 332 if (!pref_name || *pref_name == prefs::kPrimaryMouseButtonRight) {
333 const bool right = primary_mouse_button_right_.GetValue(); 333 const bool right = primary_mouse_button_right_.GetValue();
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 613
614 // Remove invalid prefs. 614 // Remove invalid prefs.
615 DictionaryPrefUpdate updater(prefs, prefs::kLanguagePreferredVirtualKeyboard); 615 DictionaryPrefUpdate updater(prefs, prefs::kLanguagePreferredVirtualKeyboard);
616 DictionaryValue* pref_value = updater.Get(); 616 DictionaryValue* pref_value = updater.Get();
617 for (size_t i = 0; i < layouts_to_remove.size(); ++i) { 617 for (size_t i = 0; i < layouts_to_remove.size(); ++i) {
618 pref_value->RemoveWithoutPathExpansion(layouts_to_remove[i], NULL); 618 pref_value->RemoveWithoutPathExpansion(layouts_to_remove[i], NULL);
619 } 619 }
620 } 620 }
621 621
622 } // namespace chromeos 622 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698