OLD | NEW |
---|---|
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 "ash/magnifier/magnifier_constants.h" | 7 #include "ash/magnifier/magnifier_constants.h" |
8 #include "base/chromeos/chromeos_version.h" | 8 #include "base/chromeos/chromeos_version.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
361 mouse_sensitivity_.Init(prefs::kMouseSensitivity, prefs, callback); | 361 mouse_sensitivity_.Init(prefs::kMouseSensitivity, prefs, callback); |
362 touchpad_sensitivity_.Init(prefs::kTouchpadSensitivity, prefs, callback); | 362 touchpad_sensitivity_.Init(prefs::kTouchpadSensitivity, prefs, callback); |
363 use_24hour_clock_.Init(prefs::kUse24HourClock, prefs, callback); | 363 use_24hour_clock_.Init(prefs::kUse24HourClock, prefs, callback); |
364 disable_drive_.Init(prefs::kDisableDrive, prefs, callback); | 364 disable_drive_.Init(prefs::kDisableDrive, prefs, callback); |
365 disable_drive_over_cellular_.Init(prefs::kDisableDriveOverCellular, | 365 disable_drive_over_cellular_.Init(prefs::kDisableDriveOverCellular, |
366 prefs, callback); | 366 prefs, callback); |
367 disable_drive_hosted_files_.Init(prefs::kDisableDriveHostedFiles, | 367 disable_drive_hosted_files_.Init(prefs::kDisableDriveHostedFiles, |
368 prefs, callback); | 368 prefs, callback); |
369 download_default_directory_.Init(prefs::kDownloadDefaultDirectory, | 369 download_default_directory_.Init(prefs::kDownloadDefaultDirectory, |
370 prefs, callback); | 370 prefs, callback); |
371 select_file_last_directory_.Init(prefs::kSelectFileLastDirectory, | |
372 prefs, callback); | |
371 primary_mouse_button_right_.Init(prefs::kPrimaryMouseButtonRight, | 373 primary_mouse_button_right_.Init(prefs::kPrimaryMouseButtonRight, |
372 prefs, callback); | 374 prefs, callback); |
373 preferred_languages_.Init(prefs::kLanguagePreferredLanguages, | 375 preferred_languages_.Init(prefs::kLanguagePreferredLanguages, |
374 prefs, callback); | 376 prefs, callback); |
375 preload_engines_.Init(prefs::kLanguagePreloadEngines, prefs, callback); | 377 preload_engines_.Init(prefs::kLanguagePreloadEngines, prefs, callback); |
376 filtered_extension_imes_.Init(prefs::kLanguageFilteredExtensionImes, | 378 filtered_extension_imes_.Init(prefs::kLanguageFilteredExtensionImes, |
377 prefs, callback); | 379 prefs, callback); |
378 current_input_method_.Init(prefs::kLanguageCurrentInputMethod, | 380 current_input_method_.Init(prefs::kLanguageCurrentInputMethod, |
379 prefs, callback); | 381 prefs, callback); |
380 previous_input_method_.Init(prefs::kLanguagePreviousInputMethod, | 382 previous_input_method_.Init(prefs::kLanguagePreviousInputMethod, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
590 download_default_directory_.GetValue()); | 592 download_default_directory_.GetValue()); |
591 if (pref_name) | 593 if (pref_name) |
592 UMA_HISTOGRAM_BOOLEAN( | 594 UMA_HISTOGRAM_BOOLEAN( |
593 "FileBrowser.DownloadDestination.IsGoogleDrive.Changed", | 595 "FileBrowser.DownloadDestination.IsGoogleDrive.Changed", |
594 default_download_to_drive); | 596 default_download_to_drive); |
595 else | 597 else |
596 UMA_HISTOGRAM_BOOLEAN( | 598 UMA_HISTOGRAM_BOOLEAN( |
597 "FileBrowser.DownloadDestination.IsGoogleDrive.Started", | 599 "FileBrowser.DownloadDestination.IsGoogleDrive.Started", |
598 default_download_to_drive); | 600 default_download_to_drive); |
599 } | 601 } |
602 if (!pref_name || *pref_name == prefs::kSelectFileLastDirectory) { | |
603 const base::FilePath pref_path = select_file_last_directory_.GetValue(); | |
604 if (drive::util::NeedsNamespaceMigration(pref_path)) { | |
achuithb
2013/04/09 06:02:35
Any chance we could add a comment here explaining
Haruki Sato
2013/04/09 07:43:12
Added a TODO and a link to a bug. We'll track it a
| |
605 prefs_->SetFilePath(prefs::kSelectFileLastDirectory, | |
606 drive::util::ConvertToMyDriveNamespace(pref_path)); | |
607 } | |
608 } | |
600 | 609 |
601 if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) { | 610 if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) { |
602 // Unlike kLanguagePreloadEngines and some other input method | 611 // Unlike kLanguagePreloadEngines and some other input method |
603 // preferencs, we don't need to send this to ibus-daemon. | 612 // preferencs, we don't need to send this to ibus-daemon. |
604 } | 613 } |
605 | 614 |
606 if (!pref_name || *pref_name == prefs::kLanguageXkbAutoRepeatEnabled) { | 615 if (!pref_name || *pref_name == prefs::kLanguageXkbAutoRepeatEnabled) { |
607 const bool enabled = xkb_auto_repeat_enabled_.GetValue(); | 616 const bool enabled = xkb_auto_repeat_enabled_.GetValue(); |
608 input_method::XKeyboard::SetAutoRepeatEnabled(enabled); | 617 input_method::XKeyboard::SetAutoRepeatEnabled(enabled); |
609 } | 618 } |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
892 | 901 |
893 input_method::AutoRepeatRate rate; | 902 input_method::AutoRepeatRate rate; |
894 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); | 903 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); |
895 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); | 904 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); |
896 DCHECK(rate.initial_delay_in_ms > 0); | 905 DCHECK(rate.initial_delay_in_ms > 0); |
897 DCHECK(rate.repeat_interval_in_ms > 0); | 906 DCHECK(rate.repeat_interval_in_ms > 0); |
898 input_method::XKeyboard::SetAutoRepeatRate(rate); | 907 input_method::XKeyboard::SetAutoRepeatRate(rate); |
899 } | 908 } |
900 | 909 |
901 } // namespace chromeos | 910 } // namespace chromeos |
OLD | NEW |