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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.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/ui/ash/system_tray_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
index 3bf4c616bf30ec64bf60ce78cc709703b340e1e3..72bb23d7f70125cd4d464617b88d464f80a2e75f 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -437,16 +437,16 @@ const std::string SystemTrayDelegateChromeOS::GetLocallyManagedUserManager()
const {
if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
return std::string();
- return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayEmail(
- chromeos::UserManager::Get()->GetActiveUser()->email());
+ return GetUserManager()->GetSupervisedUserManager()->GetManagerDisplayEmail(
+ chromeos::GetUserManager()->GetActiveUser()->email());
}
const base::string16
SystemTrayDelegateChromeOS::GetLocallyManagedUserManagerName() const {
if (GetUserLoginStatus() != ash::user::LOGGED_IN_LOCALLY_MANAGED)
return base::string16();
- return UserManager::Get()->GetSupervisedUserManager()->GetManagerDisplayName(
- chromeos::UserManager::Get()->GetActiveUser()->email());
+ return GetUserManager()->GetSupervisedUserManager()->GetManagerDisplayName(
+ chromeos::GetUserManager()->GetActiveUser()->email());
}
const base::string16 SystemTrayDelegateChromeOS::GetLocallyManagedUserMessage()
@@ -471,7 +471,7 @@ void SystemTrayDelegateChromeOS::ShowSettings() {
}
bool SystemTrayDelegateChromeOS::ShouldShowSettings() {
- return UserManager::Get()->GetCurrentUserFlow()->ShouldShowSettings();
+ return GetUserManager()->GetCurrentUserFlow()->ShouldShowSettings();
}
void SystemTrayDelegateChromeOS::ShowDateSettings() {
@@ -600,21 +600,21 @@ void SystemTrayDelegateChromeOS::ShowUserLogin() {
return;
// Only regular users could add other users to current session.
- if (UserManager::Get()->GetActiveUser()->GetType() !=
+ if (GetUserManager()->GetActiveUser()->GetType() !=
user_manager::USER_TYPE_REGULAR) {
return;
}
- if (static_cast<int>(UserManager::Get()->GetLoggedInUsers().size()) >=
+ if (static_cast<int>(GetUserManager()->GetLoggedInUsers().size()) >=
shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers())
return;
// Launch sign in screen to add another user to current session.
- if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) {
+ if (GetUserManager()->GetUsersAdmittedForMultiProfile().size()) {
// Don't show dialog if any logged in user in multi-profiles session
// dismissed it.
bool show_intro = true;
- const UserList logged_in_users = UserManager::Get()->GetLoggedInUsers();
+ const UserList logged_in_users = GetUserManager()->GetLoggedInUsers();
for (UserList::const_iterator it = logged_in_users.begin();
it != logged_in_users.end();
++it) {
@@ -909,7 +909,7 @@ ash::tray::UserAccountsDelegate*
SystemTrayDelegateChromeOS::GetUserAccountsDelegate(
const std::string& user_id) {
if (!accounts_delegates_.contains(user_id)) {
- const User* user = UserManager::Get()->FindUser(user_id);
+ const User* user = GetUserManager()->FindUser(user_id);
Profile* user_profile = ProfileHelper::Get()->GetProfileByUser(user);
CHECK(user_profile);
accounts_delegates_.set(
@@ -1044,7 +1044,7 @@ void SystemTrayDelegateChromeOS::UpdateClockType() {
GetSystemTrayNotifier()->NotifyDateFormatChanged();
// This also works for enterprise-managed devices because they never have
// local owner.
- if (chromeos::UserManager::Get()->IsCurrentUserOwner())
+ if (chromeos::GetUserManager()->IsCurrentUserOwner())
CrosSettings::Get()->SetBoolean(kSystemUse24HourClock, use_24_hour_clock);
}
@@ -1134,7 +1134,7 @@ void SystemTrayDelegateChromeOS::LoggedInStateChanged() {
// method, as LoggedInStateChanged() is also called before the logged-in
// user's profile has actually been loaded (http://crbug.com/317745). The
// system tray's time format is updated at login via SetProfile().
- if (chromeos::UserManager::Get()->IsCurrentUserOwner()) {
+ if (chromeos::GetUserManager()->IsCurrentUserOwner()) {
CrosSettings::Get()->SetBoolean(kSystemUse24HourClock,
ShouldUse24HourClock());
}

Powered by Google App Engine
This is Rietveld 408576698