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

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

Issue 1534173003: ChromeOS user_manager: move all KnownUser code to separate file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/FindUsingSAML/IsUsingSAML/ Created 5 years 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
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 <vector> 7 #include <vector>
8 8
9 #include "ash/autoclick/autoclick_controller.h" 9 #include "ash/autoclick/autoclick_controller.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 20 matching lines...) Expand all
31 #include "chrome/browser/prefs/pref_service_syncable_util.h" 31 #include "chrome/browser/prefs/pref_service_syncable_util.h"
32 #include "chrome/common/chrome_switches.h" 32 #include "chrome/common/chrome_switches.h"
33 #include "chrome/common/pref_names.h" 33 #include "chrome/common/pref_names.h"
34 #include "chromeos/chromeos_switches.h" 34 #include "chromeos/chromeos_switches.h"
35 #include "chromeos/system/statistics_provider.h" 35 #include "chromeos/system/statistics_provider.h"
36 #include "chromeos/timezone/timezone_resolver.h" 36 #include "chromeos/timezone/timezone_resolver.h"
37 #include "components/drive/drive_pref_names.h" 37 #include "components/drive/drive_pref_names.h"
38 #include "components/feedback/tracing_manager.h" 38 #include "components/feedback/tracing_manager.h"
39 #include "components/pref_registry/pref_registry_syncable.h" 39 #include "components/pref_registry/pref_registry_syncable.h"
40 #include "components/syncable_prefs/pref_service_syncable.h" 40 #include "components/syncable_prefs/pref_service_syncable.h"
41 #include "components/user_manager/known_user.h"
41 #include "components/user_manager/user.h" 42 #include "components/user_manager/user.h"
43 #include "components/user_manager/user_manager.h"
42 #include "content/public/browser/browser_thread.h" 44 #include "content/public/browser/browser_thread.h"
43 #include "third_party/icu/source/i18n/unicode/timezone.h" 45 #include "third_party/icu/source/i18n/unicode/timezone.h"
44 #include "ui/base/ime/chromeos/extension_ime_util.h" 46 #include "ui/base/ime/chromeos/extension_ime_util.h"
45 #include "ui/base/ime/chromeos/ime_keyboard.h" 47 #include "ui/base/ime/chromeos/ime_keyboard.h"
46 #include "ui/base/ime/chromeos/input_method_manager.h" 48 #include "ui/base/ime/chromeos/input_method_manager.h"
47 #include "ui/chromeos/accessibility_types.h" 49 #include "ui/chromeos/accessibility_types.h"
48 #include "ui/events/event_constants.h" 50 #include "ui/events/event_constants.h"
49 #include "ui/events/event_utils.h" 51 #include "ui/events/event_utils.h"
50 #include "url/gurl.h" 52 #include "url/gurl.h"
51 53
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 g_browser_process->local_state()->ClearPref( 620 g_browser_process->local_state()->ClearPref(
619 TimeZoneResolver::kLastTimeZoneRefreshTime); 621 TimeZoneResolver::kLastTimeZoneRefreshTime);
620 } 622 }
621 } 623 }
622 } 624 }
623 } 625 }
624 626
625 if (pref_name == prefs::kUse24HourClock || 627 if (pref_name == prefs::kUse24HourClock ||
626 reason != REASON_ACTIVE_USER_CHANGED) { 628 reason != REASON_ACTIVE_USER_CHANGED) {
627 const bool value = prefs_->GetBoolean(prefs::kUse24HourClock); 629 const bool value = prefs_->GetBoolean(prefs::kUse24HourClock);
628 user_manager::UserManager::Get()->SetKnownUserBooleanPref( 630 user_manager::known_user::SetBooleanPref(user_->GetAccountId(),
629 user_->GetAccountId(), prefs::kUse24HourClock, value); 631 prefs::kUse24HourClock, value);
630 } 632 }
631 } 633 }
632 634
633 void Preferences::OnIsSyncingChanged() { 635 void Preferences::OnIsSyncingChanged() {
634 DVLOG(1) << "OnIsSyncingChanged"; 636 DVLOG(1) << "OnIsSyncingChanged";
635 ForceNaturalScrollDefault(); 637 ForceNaturalScrollDefault();
636 } 638 }
637 639
638 void Preferences::ForceNaturalScrollDefault() { 640 void Preferences::ForceNaturalScrollDefault() {
639 DVLOG(1) << "ForceNaturalScrollDefault"; 641 DVLOG(1) << "ForceNaturalScrollDefault";
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 touch_hud_projection_enabled_.SetValue(enabled); 716 touch_hud_projection_enabled_.SetValue(enabled);
715 } 717 }
716 718
717 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { 719 void Preferences::ActiveUserChanged(const user_manager::User* active_user) {
718 if (active_user != user_) 720 if (active_user != user_)
719 return; 721 return;
720 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); 722 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, "");
721 } 723 }
722 724
723 } // namespace chromeos 725 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/users/fake_chrome_user_manager.cc ('k') | chrome/browser/signin/chrome_signin_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698