OLD | NEW |
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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 const base::FilePath& profile_path); | 175 const base::FilePath& profile_path); |
176 | 176 |
177 // Saves the avatar |image| at |image_path|. This is used both for the | 177 // Saves the avatar |image| at |image_path|. This is used both for the |
178 // GAIA profile pictures and the ProfileAvatarDownloader that is used to | 178 // GAIA profile pictures and the ProfileAvatarDownloader that is used to |
179 // download the high res avatars. | 179 // download the high res avatars. |
180 void SaveAvatarImageAtPath(const gfx::Image* image, | 180 void SaveAvatarImageAtPath(const gfx::Image* image, |
181 const std::string& key, | 181 const std::string& key, |
182 const base::FilePath& image_path, | 182 const base::FilePath& image_path, |
183 const base::FilePath& profile_path); | 183 const base::FilePath& profile_path); |
184 | 184 |
185 void AddObserver(ProfileInfoCacheObserver* obs); | 185 void AddObserver(ProfileInfoCacheObserver* obs) override; |
186 void RemoveObserver(ProfileInfoCacheObserver* obs); | 186 void RemoveObserver(ProfileInfoCacheObserver* obs) override; |
187 | 187 |
188 void set_disable_avatar_download_for_testing( | 188 void set_disable_avatar_download_for_testing( |
189 bool disable_avatar_download_for_testing) { | 189 bool disable_avatar_download_for_testing) { |
190 disable_avatar_download_for_testing_ = disable_avatar_download_for_testing; | 190 disable_avatar_download_for_testing_ = disable_avatar_download_for_testing; |
191 } | 191 } |
192 | 192 |
193 // ProfileAttributesStorage: | 193 // ProfileAttributesStorage: |
194 void AddProfile(const base::FilePath& profile_path, | 194 void AddProfile(const base::FilePath& profile_path, |
195 const base::string16& name, | 195 const base::string16& name, |
196 const std::string& gaia_id, | 196 const std::string& gaia_id, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 avatar_images_downloads_in_progress_; | 286 avatar_images_downloads_in_progress_; |
287 | 287 |
288 // Determines of the ProfileAvatarDownloader should be created and executed | 288 // Determines of the ProfileAvatarDownloader should be created and executed |
289 // or not. Only set to true for tests. | 289 // or not. Only set to true for tests. |
290 bool disable_avatar_download_for_testing_; | 290 bool disable_avatar_download_for_testing_; |
291 | 291 |
292 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); | 292 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); |
293 }; | 293 }; |
294 | 294 |
295 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ | 295 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ |
OLD | NEW |