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

Unified Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 845373002: Change default code flag to NewAvatarMenu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test comment. GetAvatarIcon's no longer const. Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/profiles/avatar_menu_button_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 186dd0e3fc9bae89beb4cf2ce527bfcb6605ff99..1b8bd7bf94dfadc1d5a23e89854dc70002023dfc 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 @@ void OpenNewWindowForProfile(
}
std::string GetAvatarImageAtIndex(
- size_t index, const ProfileInfoCache& info_cache) {
+ size_t index, 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::GetLocalizedValues(
void UserManagerScreenHandler::SendUserList() {
base::ListValue users_list;
- const ProfileInfoCache& info_cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
+ 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 @@ void UserManagerScreenHandler::SendUserList() {
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 @@ void UserManagerScreenHandler::SendUserList() {
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);
« no previous file with comments | « chrome/browser/ui/views/profiles/avatar_menu_button_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698