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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/autoclick/autoclick_controller.h" | 9 #include "ash/autoclick/autoclick_controller.h" |
10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 UMA_HISTOGRAM_BOOLEAN( | 523 UMA_HISTOGRAM_BOOLEAN( |
524 "FileBrowser.DownloadDestination.IsGoogleDrive.Changed", | 524 "FileBrowser.DownloadDestination.IsGoogleDrive.Changed", |
525 default_download_to_drive); | 525 default_download_to_drive); |
526 else if (reason == REASON_INITIALIZATION) | 526 else if (reason == REASON_INITIALIZATION) |
527 UMA_HISTOGRAM_BOOLEAN( | 527 UMA_HISTOGRAM_BOOLEAN( |
528 "FileBrowser.DownloadDestination.IsGoogleDrive.Started", | 528 "FileBrowser.DownloadDestination.IsGoogleDrive.Started", |
529 default_download_to_drive); | 529 default_download_to_drive); |
530 } | 530 } |
531 if (reason != REASON_PREF_CHANGED || | 531 if (reason != REASON_PREF_CHANGED || |
532 pref_name == prefs::kTouchHudProjectionEnabled) { | 532 pref_name == prefs::kTouchHudProjectionEnabled) { |
533 if (user_is_active) { | 533 if (user_is_active && ash::Shell::HasInstance()) { |
534 const bool enabled = touch_hud_projection_enabled_.GetValue(); | 534 const bool enabled = touch_hud_projection_enabled_.GetValue(); |
535 ash::Shell::GetInstance()->SetTouchHudProjectionEnabled(enabled); | 535 ash::Shell::GetInstance()->SetTouchHudProjectionEnabled(enabled); |
536 } | 536 } |
537 } | 537 } |
538 | 538 |
539 if (reason != REASON_PREF_CHANGED || | 539 if (reason != REASON_PREF_CHANGED || |
540 pref_name == prefs::kLanguageXkbAutoRepeatEnabled) { | 540 pref_name == prefs::kLanguageXkbAutoRepeatEnabled) { |
541 if (user_is_active) { | 541 if (user_is_active) { |
542 const bool enabled = xkb_auto_repeat_enabled_.GetValue(); | 542 const bool enabled = xkb_auto_repeat_enabled_.GetValue(); |
543 input_method::InputMethodManager::Get() | 543 input_method::InputMethodManager::Get() |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 touch_hud_projection_enabled_.SetValue(enabled); | 664 touch_hud_projection_enabled_.SetValue(enabled); |
665 } | 665 } |
666 | 666 |
667 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 667 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
668 if (active_user != user_) | 668 if (active_user != user_) |
669 return; | 669 return; |
670 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 670 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
671 } | 671 } |
672 | 672 |
673 } // namespace chromeos | 673 } // namespace chromeos |
OLD | NEW |