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

Unified Diff: chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.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/webui/options/chromeos/core_chromeos_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
index da650894bc43efc85dec1c4deea8b8dd3c3580a1..8a0384cbb2ae3c8689b33f49d2ac0d07e9f5e987 100644
--- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -57,7 +57,7 @@ base::DictionaryValue* CreateUserInfo(const std::string& username,
user_dict->SetString("name", display_email);
user_dict->SetString("email", display_name);
- bool is_owner = UserManager::Get()->GetOwnerEmail() == username;
+ bool is_owner = GetUserManager()->GetOwnerEmail() == username;
user_dict->SetBoolean("owner", is_owner);
return user_dict;
}
@@ -68,7 +68,7 @@ base::Value* CreateUsersWhitelist(const base::Value *pref_value) {
const base::ListValue* list_value =
static_cast<const base::ListValue*>(pref_value);
base::ListValue* user_list = new base::ListValue();
- UserManager* user_manager = UserManager::Get();
+ UserManager* user_manager = GetUserManager();
for (base::ListValue::const_iterator i = list_value->begin();
i != list_value->end(); ++i) {
@@ -244,7 +244,7 @@ base::Value* CoreChromeOSOptionsHandler::CreateValueForPref(
// The screen lock setting is shared if multiple users are logged in and at
// least one has chosen to require passwords.
if (pref_name == prefs::kEnableAutoScreenLock &&
- UserManager::Get()->GetLoggedInUsers().size() > 1 &&
+ GetUserManager()->GetLoggedInUsers().size() > 1 &&
controlling_pref_name.empty()) {
PrefService* user_prefs = Profile::FromWebUI(web_ui())->GetPrefs();
const PrefService::Preference* pref =
@@ -281,7 +281,7 @@ void CoreChromeOSOptionsHandler::GetLocalizedValues(
Profile* profile = Profile::FromWebUI(web_ui());
AddAccountUITweaksLocalizedValues(localized_strings, profile);
- UserManager* user_manager = UserManager::Get();
+ UserManager* user_manager = GetUserManager();
// Check at load time whether this is a secondary user in a multi-profile
// session.

Powered by Google App Engine
This is Rietveld 408576698