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

Unified Diff: chrome/browser/chromeos/login/users/multi_profile_user_controller.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/login/users/multi_profile_user_controller.cc
diff --git a/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc b/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc
index 980955a877ddd08037e17eb2c0e6ebdb4323331c..8125b5188c4e3a0aeddc650f81dbc686fd26f5b0 100644
--- a/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc
+++ b/chrome/browser/chromeos/login/users/multi_profile_user_controller.cc
@@ -83,7 +83,7 @@ void MultiProfileUserController::RegisterProfilePrefs(
MultiProfileUserController::UserAllowedInSessionResult
MultiProfileUserController::IsUserAllowedInSession(
const std::string& user_email) const {
- UserManager* user_manager = UserManager::Get();
+ UserManager* user_manager = GetUserManager();
CHECK(user_manager);
const User* primary_user = user_manager->GetPrimaryUser();
@@ -174,7 +174,7 @@ std::string MultiProfileUserController::GetCachedValue(
return SanitizeBehaviorValue(value);
// Owner is not allowed to be secondary user (see http://crbug.com/385034).
- if (UserManager::Get()->GetOwnerEmail() == user_email)
+ if (GetUserManager()->GetOwnerEmail() == user_email)
return std::string(kBehaviorOwnerPrimaryOnly);
return std::string(kBehaviorUnrestricted);
@@ -190,7 +190,7 @@ void MultiProfileUserController::SetCachedValue(
}
void MultiProfileUserController::CheckSessionUsers() {
- const UserList& users = UserManager::Get()->GetLoggedInUsers();
+ const UserList& users = GetUserManager()->GetLoggedInUsers();
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
if (IsUserAllowedInSession((*it)->email()) != ALLOWED) {
delegate_->OnUserNotAllowed((*it)->email());

Powered by Google App Engine
This is Rietveld 408576698