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

Unified Diff: chrome/browser/chromeos/preferences.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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/chromeos/preferences.cc
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index 1a792e0206025446cb4d1d8b25e29ea1fc4dbe42..85bec8a14aee1bef5220deca6bf5e6684b992f58 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -71,7 +71,7 @@ Preferences::Preferences(input_method::InputMethodManager* input_method_manager)
Preferences::~Preferences() {
prefs_->RemoveObserver(this);
- UserManager::Get()->RemoveSessionStateObserver(this);
+ GetUserManager()->RemoveSessionStateObserver(this);
// If shell instance is destoryed before this preferences instance, there is
// no need to remove this shell observer.
if (ash::Shell::HasInstance())
@@ -354,10 +354,10 @@ void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) {
void Preferences::Init(PrefServiceSyncable* prefs, const User* user) {
DCHECK(user);
user_ = user;
- user_is_primary_ = UserManager::Get()->GetPrimaryUser() == user_;
+ user_is_primary_ = GetUserManager()->GetPrimaryUser() == user_;
InitUserPrefs(prefs);
- UserManager::Get()->AddSessionStateObserver(this);
+ GetUserManager()->AddSessionStateObserver(this);
// This causes OnIsSyncingChanged to be called when the value of
// PrefService::IsSyncing() changes.
@@ -391,7 +391,7 @@ void Preferences::ApplyPreferences(ApplyReason reason,
const std::string& pref_name) {
DCHECK(reason != REASON_PREF_CHANGED || !pref_name.empty());
const bool user_is_owner =
- UserManager::Get()->GetOwnerEmail() == user_->email();
+ GetUserManager()->GetOwnerEmail() == user_->email();
const bool user_is_active = user_->is_active();
system::TouchpadSettings touchpad_settings;

Powered by Google App Engine
This is Rietveld 408576698