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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // SetIsOmittedProfileAtIndex() to clear the flag when the profile is ready to | 45 // SetIsOmittedProfileAtIndex() to clear the flag when the profile is ready to |
46 // be shown in the menu. | 46 // be shown in the menu. |
47 void AddProfileToCache(const base::FilePath& profile_path, | 47 void AddProfileToCache(const base::FilePath& profile_path, |
48 const base::string16& name, | 48 const base::string16& name, |
49 const base::string16& username, | 49 const base::string16& username, |
50 size_t icon_index, | 50 size_t icon_index, |
51 const std::string& supervised_user_id); | 51 const std::string& supervised_user_id); |
52 void DeleteProfileFromCache(const base::FilePath& profile_path); | 52 void DeleteProfileFromCache(const base::FilePath& profile_path); |
53 | 53 |
54 // ProfileInfoInterface: | 54 // ProfileInfoInterface: |
55 virtual size_t GetNumberOfProfiles() const OVERRIDE; | 55 virtual size_t GetNumberOfProfiles() const override; |
56 // Don't cache this value and reuse, because resorting the menu could cause | 56 // Don't cache this value and reuse, because resorting the menu could cause |
57 // the item being referred to to change out from under you. | 57 // the item being referred to to change out from under you. |
58 virtual size_t GetIndexOfProfileWithPath( | 58 virtual size_t GetIndexOfProfileWithPath( |
59 const base::FilePath& profile_path) const OVERRIDE; | 59 const base::FilePath& profile_path) const override; |
60 virtual base::string16 GetNameOfProfileAtIndex(size_t index) const OVERRIDE; | 60 virtual base::string16 GetNameOfProfileAtIndex(size_t index) const override; |
61 virtual base::string16 GetShortcutNameOfProfileAtIndex(size_t index) | 61 virtual base::string16 GetShortcutNameOfProfileAtIndex(size_t index) |
62 const OVERRIDE; | 62 const override; |
63 virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const OVERRIDE; | 63 virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const override; |
64 virtual base::Time GetProfileActiveTimeAtIndex(size_t index) const OVERRIDE; | 64 virtual base::Time GetProfileActiveTimeAtIndex(size_t index) const override; |
65 virtual base::string16 GetUserNameOfProfileAtIndex( | 65 virtual base::string16 GetUserNameOfProfileAtIndex( |
66 size_t index) const OVERRIDE; | 66 size_t index) const override; |
67 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( | 67 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( |
68 size_t index) const OVERRIDE; | 68 size_t index) const override; |
69 virtual std::string GetLocalAuthCredentialsOfProfileAtIndex( | 69 virtual std::string GetLocalAuthCredentialsOfProfileAtIndex( |
70 size_t index) const OVERRIDE; | 70 size_t index) const override; |
71 // Note that a return value of false could mean an error in collection or | 71 // Note that a return value of false could mean an error in collection or |
72 // that there are currently no background apps running. However, the action | 72 // that there are currently no background apps running. However, the action |
73 // which results is the same in both cases (thus far). | 73 // which results is the same in both cases (thus far). |
74 virtual bool GetBackgroundStatusOfProfileAtIndex( | 74 virtual bool GetBackgroundStatusOfProfileAtIndex( |
75 size_t index) const OVERRIDE; | 75 size_t index) const override; |
76 virtual base::string16 GetGAIANameOfProfileAtIndex( | 76 virtual base::string16 GetGAIANameOfProfileAtIndex( |
77 size_t index) const OVERRIDE; | 77 size_t index) const override; |
78 virtual base::string16 GetGAIAGivenNameOfProfileAtIndex( | 78 virtual base::string16 GetGAIAGivenNameOfProfileAtIndex( |
79 size_t index) const OVERRIDE; | 79 size_t index) const override; |
80 // Returns the GAIA picture for the given profile. This may return NULL | 80 // Returns the GAIA picture for the given profile. This may return NULL |
81 // if the profile does not have a GAIA picture or if the picture must be | 81 // if the profile does not have a GAIA picture or if the picture must be |
82 // loaded from disk. | 82 // loaded from disk. |
83 virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex( | 83 virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex( |
84 size_t index) const OVERRIDE; | 84 size_t index) const override; |
85 virtual bool IsUsingGAIAPictureOfProfileAtIndex( | 85 virtual bool IsUsingGAIAPictureOfProfileAtIndex( |
86 size_t index) const OVERRIDE; | 86 size_t index) const override; |
87 virtual bool ProfileIsSupervisedAtIndex(size_t index) const OVERRIDE; | 87 virtual bool ProfileIsSupervisedAtIndex(size_t index) const override; |
88 virtual bool IsOmittedProfileAtIndex(size_t index) const OVERRIDE; | 88 virtual bool IsOmittedProfileAtIndex(size_t index) const override; |
89 virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const OVERRIDE; | 89 virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const override; |
90 virtual std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const | 90 virtual std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const |
91 OVERRIDE; | 91 override; |
92 virtual bool ProfileIsEphemeralAtIndex(size_t index) const OVERRIDE; | 92 virtual bool ProfileIsEphemeralAtIndex(size_t index) const override; |
93 virtual bool ProfileIsUsingDefaultNameAtIndex(size_t index) const OVERRIDE; | 93 virtual bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override; |
94 virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const OVERRIDE; | 94 virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override; |
95 | 95 |
96 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; | 96 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; |
97 | 97 |
98 void SetProfileActiveTimeAtIndex(size_t index); | 98 void SetProfileActiveTimeAtIndex(size_t index); |
99 // Warning: This will re-sort profiles and thus may change indices! | 99 // Warning: This will re-sort profiles and thus may change indices! |
100 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); | 100 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); |
101 void SetShortcutNameOfProfileAtIndex(size_t index, | 101 void SetShortcutNameOfProfileAtIndex(size_t index, |
102 const base::string16& name); | 102 const base::string16& name); |
103 void SetUserNameOfProfileAtIndex(size_t index, | 103 void SetUserNameOfProfileAtIndex(size_t index, |
104 const base::string16& user_name); | 104 const base::string16& user_name); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // This prevents a picture from being downloaded multiple times. The | 229 // This prevents a picture from being downloaded multiple times. The |
230 // ProfileAvatarDownloader instances are deleted when the download completes | 230 // ProfileAvatarDownloader instances are deleted when the download completes |
231 // or when the ProfileInfoCache is destroyed. | 231 // or when the ProfileInfoCache is destroyed. |
232 mutable std::map<std::string, ProfileAvatarDownloader*> | 232 mutable std::map<std::string, ProfileAvatarDownloader*> |
233 avatar_images_downloads_in_progress_; | 233 avatar_images_downloads_in_progress_; |
234 | 234 |
235 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); | 235 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); |
236 }; | 236 }; |
237 | 237 |
238 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ | 238 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ |
OLD | NEW |