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

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

Issue 890873004: ProfileInfoCache: Don't delete ProfileAvatarDownloader while we're being called by it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 mutable std::map<std::string, gfx::Image*> cached_avatar_images_; 224 mutable std::map<std::string, gfx::Image*> cached_avatar_images_;
225 // Marks a profile picture as loading from disk. This prevents a picture from 225 // Marks a profile picture as loading from disk. This prevents a picture from
226 // loading multiple times. 226 // loading multiple times.
227 mutable std::map<std::string, bool> cached_avatar_images_loading_; 227 mutable std::map<std::string, bool> cached_avatar_images_loading_;
228 228
229 // Map of profile pictures currently being downloaded from the remote 229 // Map of profile pictures currently being downloaded from the remote
230 // location and the ProfileAvatarDownloader instances downloading them. 230 // location and the ProfileAvatarDownloader instances downloading them.
231 // This prevents a picture from being downloaded multiple times. The 231 // This prevents a picture from being downloaded multiple times. The
232 // ProfileAvatarDownloader instances are deleted when the download completes 232 // ProfileAvatarDownloader instances are deleted when the download completes
233 // or when the ProfileInfoCache is destroyed. 233 // or when the ProfileInfoCache is destroyed.
234 mutable std::map<std::string, ProfileAvatarDownloader*> 234 std::map<std::string, ProfileAvatarDownloader*>
235 avatar_images_downloads_in_progress_; 235 avatar_images_downloads_in_progress_;
236 236
237 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); 237 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache);
238 }; 238 };
239 239
240 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ 240 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_cache.cc » ('j') | chrome/browser/profiles/profile_info_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698