OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual size_t GetNumberOfProfiles() const OVERRIDE; | 48 virtual size_t GetNumberOfProfiles() const OVERRIDE; |
49 // Don't cache this value and reuse, because resorting the menu could cause | 49 // Don't cache this value and reuse, because resorting the menu could cause |
50 // the item being referred to to change out from under you. | 50 // the item being referred to to change out from under you. |
51 virtual size_t GetIndexOfProfileWithPath( | 51 virtual size_t GetIndexOfProfileWithPath( |
52 const FilePath& profile_path) const OVERRIDE; | 52 const FilePath& profile_path) const OVERRIDE; |
53 virtual string16 GetNameOfProfileAtIndex(size_t index) const OVERRIDE; | 53 virtual string16 GetNameOfProfileAtIndex(size_t index) const OVERRIDE; |
54 virtual FilePath GetPathOfProfileAtIndex(size_t index) const OVERRIDE; | 54 virtual FilePath GetPathOfProfileAtIndex(size_t index) const OVERRIDE; |
55 virtual string16 GetUserNameOfProfileAtIndex(size_t index) const OVERRIDE; | 55 virtual string16 GetUserNameOfProfileAtIndex(size_t index) const OVERRIDE; |
56 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( | 56 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( |
57 size_t index) const OVERRIDE; | 57 size_t index) const OVERRIDE; |
| 58 // Note that a return value of false could mean an error in collection or |
| 59 // that there are currently no background apps running. However, the action |
| 60 // which results is the same in both cases (thus far). |
58 virtual bool GetBackgroundStatusOfProfileAtIndex( | 61 virtual bool GetBackgroundStatusOfProfileAtIndex( |
59 size_t index) const OVERRIDE; | 62 size_t index) const OVERRIDE; |
60 virtual string16 GetGAIANameOfProfileAtIndex(size_t index) const OVERRIDE; | 63 virtual string16 GetGAIANameOfProfileAtIndex(size_t index) const OVERRIDE; |
61 virtual bool IsUsingGAIANameOfProfileAtIndex(size_t index) const OVERRIDE; | 64 virtual bool IsUsingGAIANameOfProfileAtIndex(size_t index) const OVERRIDE; |
62 // Returns the GAIA picture for the given profile. This may return NULL | 65 // Returns the GAIA picture for the given profile. This may return NULL |
63 // if the profile does not have a GAIA picture or if the picture must be | 66 // if the profile does not have a GAIA picture or if the picture must be |
64 // loaded from disk. | 67 // loaded from disk. |
65 virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex( | 68 virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex( |
66 size_t index) const OVERRIDE; | 69 size_t index) const OVERRIDE; |
67 virtual bool IsUsingGAIAPictureOfProfileAtIndex( | 70 virtual bool IsUsingGAIAPictureOfProfileAtIndex( |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // to be mutable. | 164 // to be mutable. |
162 mutable std::map<std::string, gfx::Image*> gaia_pictures_; | 165 mutable std::map<std::string, gfx::Image*> gaia_pictures_; |
163 // Marks a gaia profile picture as loading. This prevents a picture from | 166 // Marks a gaia profile picture as loading. This prevents a picture from |
164 // loading multiple times. | 167 // loading multiple times. |
165 mutable std::map<std::string, bool> gaia_pictures_loading_; | 168 mutable std::map<std::string, bool> gaia_pictures_loading_; |
166 | 169 |
167 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); | 170 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); |
168 }; | 171 }; |
169 | 172 |
170 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ | 173 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ |
OLD | NEW |