Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
index 1b8bd7bf94dfadc1d5a23e89854dc70002023dfc..186dd0e3fc9bae89beb4cf2ce527bfcb6605ff99 100644 |
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc |
@@ -98,15 +98,15 @@ |
} |
std::string GetAvatarImageAtIndex( |
- size_t index, ProfileInfoCache* info_cache) { |
+ size_t index, const ProfileInfoCache& info_cache) { |
bool is_gaia_picture = |
- info_cache->IsUsingGAIAPictureOfProfileAtIndex(index) && |
- info_cache->GetGAIAPictureOfProfileAtIndex(index); |
+ info_cache.IsUsingGAIAPictureOfProfileAtIndex(index) && |
+ info_cache.GetGAIAPictureOfProfileAtIndex(index); |
// If the avatar is too small (i.e. the old-style low resolution avatar), |
// it will be pixelated when displayed in the User Manager, so we should |
// return the placeholder avatar instead. |
- gfx::Image avatar_image = info_cache->GetAvatarIconOfProfileAtIndex(index); |
+ gfx::Image avatar_image = info_cache.GetAvatarIconOfProfileAtIndex(index); |
if (avatar_image.Width() <= profiles::kAvatarIconWidth || |
avatar_image.Height() <= profiles::kAvatarIconHeight ) { |
avatar_image = ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
@@ -716,8 +716,8 @@ |
void UserManagerScreenHandler::SendUserList() { |
base::ListValue users_list; |
- ProfileInfoCache* info_cache = |
- &g_browser_process->profile_manager()->GetProfileInfoCache(); |
+ const ProfileInfoCache& info_cache = |
+ g_browser_process->profile_manager()->GetProfileInfoCache(); |
user_auth_type_map_.clear(); |
// Profile deletion is not allowed in Metro mode. |
@@ -726,14 +726,14 @@ |
can_remove = !ash::Shell::HasInstance(); |
#endif |
- for (size_t i = 0; i < info_cache->GetNumberOfProfiles(); ++i) { |
+ for (size_t i = 0; i < info_cache.GetNumberOfProfiles(); ++i) { |
base::DictionaryValue* profile_value = new base::DictionaryValue(); |
- base::FilePath profile_path = info_cache->GetPathOfProfileAtIndex(i); |
+ base::FilePath profile_path = info_cache.GetPathOfProfileAtIndex(i); |
profile_value->SetString( |
- kKeyUsername, info_cache->GetUserNameOfProfileAtIndex(i)); |
+ kKeyUsername, info_cache.GetUserNameOfProfileAtIndex(i)); |
profile_value->SetString( |
- kKeyEmailAddress, info_cache->GetUserNameOfProfileAtIndex(i)); |
+ kKeyEmailAddress, info_cache.GetUserNameOfProfileAtIndex(i)); |
profile_value->SetString( |
kKeyDisplayName, |
profiles::GetAvatarNameForProfile(profile_path)); |
@@ -741,11 +741,11 @@ |
kKeyProfilePath, base::CreateFilePathValue(profile_path)); |
profile_value->SetBoolean(kKeyPublicAccount, false); |
profile_value->SetBoolean(kKeyLegacySupervisedUser, |
- info_cache->ProfileIsLegacySupervisedAtIndex(i)); |
+ info_cache.ProfileIsLegacySupervisedAtIndex(i)); |
profile_value->SetBoolean( |
- kKeyChildUser, info_cache->ProfileIsChildAtIndex(i)); |
+ kKeyChildUser, info_cache.ProfileIsChildAtIndex(i)); |
profile_value->SetBoolean( |
- kKeyNeedsSignin, info_cache->ProfileIsSigninRequiredAtIndex(i)); |
+ kKeyNeedsSignin, info_cache.ProfileIsSigninRequiredAtIndex(i)); |
profile_value->SetBoolean(kKeyIsOwner, false); |
profile_value->SetBoolean(kKeyCanRemove, can_remove); |
profile_value->SetBoolean(kKeyIsDesktop, true); |