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

Side by Side Diff: chrome/browser/profiles/profile_info_cache.cc

Issue 380643002: Profile picture doesn't display correctly after new profile has been created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update patch 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_info_cache.h" 5 #include "chrome/browser/profiles/profile_info_cache.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 sorted_keys_.insert(FindPositionForProfile(key, name), key); 230 sorted_keys_.insert(FindPositionForProfile(key, name), key);
231 231
232 FOR_EACH_OBSERVER(ProfileInfoCacheObserver, 232 FOR_EACH_OBSERVER(ProfileInfoCacheObserver,
233 observer_list_, 233 observer_list_,
234 OnProfileAdded(profile_path)); 234 OnProfileAdded(profile_path));
235 235
236 content::NotificationService::current()->Notify( 236 content::NotificationService::current()->Notify(
237 chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, 237 chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
238 content::NotificationService::AllSources(), 238 content::NotificationService::AllSources(),
239 content::NotificationService::NoDetails()); 239 content::NotificationService::NoDetails());
240
241 if (switches::IsNewAvatarMenu())
noms (inactive) 2014/07/09 13:37:29 I think it might make more sense to move this to r
Malcolm 2014/07/10 03:54:04 Done, and add TEST= On 2014/07/09 13:37:29, Monica
242 DownloadHighResAvatar(icon_index, profile_path);
240 } 243 }
241 244
242 void ProfileInfoCache::AddObserver(ProfileInfoCacheObserver* obs) { 245 void ProfileInfoCache::AddObserver(ProfileInfoCacheObserver* obs) {
243 observer_list_.AddObserver(obs); 246 observer_list_.AddObserver(obs);
244 } 247 }
245 248
246 void ProfileInfoCache::RemoveObserver(ProfileInfoCacheObserver* obs) { 249 void ProfileInfoCache::RemoveObserver(ProfileInfoCacheObserver* obs) {
247 observer_list_.RemoveObserver(obs); 250 observer_list_.RemoveObserver(obs);
248 } 251 }
249 252
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 OnProfileAvatarChanged(profile_path)); 1013 OnProfileAvatarChanged(profile_path));
1011 1014
1012 // Remove the file from the list of downloads in progress. Note that this list 1015 // Remove the file from the list of downloads in progress. Note that this list
1013 // only contains the high resolution avatars, and not the Gaia profile images. 1016 // only contains the high resolution avatars, and not the Gaia profile images.
1014 if (!avatar_images_downloads_in_progress_[file_name]) 1017 if (!avatar_images_downloads_in_progress_[file_name])
1015 return; 1018 return;
1016 1019
1017 delete avatar_images_downloads_in_progress_[file_name]; 1020 delete avatar_images_downloads_in_progress_[file_name];
1018 avatar_images_downloads_in_progress_[file_name] = NULL; 1021 avatar_images_downloads_in_progress_[file_name] = NULL;
1019 } 1022 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698