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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const override; | 78 bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const override; |
79 bool ProfileIsSupervisedAtIndex(size_t index) const override; | 79 bool ProfileIsSupervisedAtIndex(size_t index) const override; |
80 bool ProfileIsChildAtIndex(size_t index) const override; | 80 bool ProfileIsChildAtIndex(size_t index) const override; |
81 bool ProfileIsLegacySupervisedAtIndex(size_t index) const override; | 81 bool ProfileIsLegacySupervisedAtIndex(size_t index) const override; |
82 bool IsOmittedProfileAtIndex(size_t index) const override; | 82 bool IsOmittedProfileAtIndex(size_t index) const override; |
83 bool ProfileIsSigninRequiredAtIndex(size_t index) const override; | 83 bool ProfileIsSigninRequiredAtIndex(size_t index) const override; |
84 std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const override; | 84 std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const override; |
85 bool ProfileIsEphemeralAtIndex(size_t index) const override; | 85 bool ProfileIsEphemeralAtIndex(size_t index) const override; |
86 bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override; | 86 bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override; |
87 bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override; | 87 bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override; |
| 88 bool ProfileIsAuthErrorAtIndex(size_t index) const; |
88 | 89 |
89 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; | 90 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; |
90 | 91 |
91 void SetProfileActiveTimeAtIndex(size_t index); | 92 void SetProfileActiveTimeAtIndex(size_t index); |
92 // Warning: This will re-sort profiles and thus may change indices! | 93 // Warning: This will re-sort profiles and thus may change indices! |
93 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); | 94 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); |
94 void SetShortcutNameOfProfileAtIndex(size_t index, | 95 void SetShortcutNameOfProfileAtIndex(size_t index, |
95 const base::string16& name); | 96 const base::string16& name); |
96 void SetUserNameOfProfileAtIndex(size_t index, | 97 void SetUserNameOfProfileAtIndex(size_t index, |
97 const base::string16& user_name); | 98 const base::string16& user_name); |
98 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); | 99 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); |
99 void SetIsOmittedProfileAtIndex(size_t index, bool is_omitted); | 100 void SetIsOmittedProfileAtIndex(size_t index, bool is_omitted); |
100 void SetSupervisedUserIdOfProfileAtIndex(size_t index, const std::string& id); | 101 void SetSupervisedUserIdOfProfileAtIndex(size_t index, const std::string& id); |
101 void SetLocalAuthCredentialsOfProfileAtIndex(size_t index, | 102 void SetLocalAuthCredentialsOfProfileAtIndex(size_t index, |
102 const std::string& auth); | 103 const std::string& auth); |
103 void SetBackgroundStatusOfProfileAtIndex(size_t index, | 104 void SetBackgroundStatusOfProfileAtIndex(size_t index, |
104 bool running_background_apps); | 105 bool running_background_apps); |
105 // Warning: This will re-sort profiles and thus may change indices! | 106 // Warning: This will re-sort profiles and thus may change indices! |
106 void SetGAIANameOfProfileAtIndex(size_t index, const base::string16& name); | 107 void SetGAIANameOfProfileAtIndex(size_t index, const base::string16& name); |
107 // Warning: This will re-sort profiles and thus may change indices! | 108 // Warning: This will re-sort profiles and thus may change indices! |
108 void SetGAIAGivenNameOfProfileAtIndex(size_t index, | 109 void SetGAIAGivenNameOfProfileAtIndex(size_t index, |
109 const base::string16& name); | 110 const base::string16& name); |
110 void SetGAIAPictureOfProfileAtIndex(size_t index, const gfx::Image* image); | 111 void SetGAIAPictureOfProfileAtIndex(size_t index, const gfx::Image* image); |
111 void SetIsUsingGAIAPictureOfProfileAtIndex(size_t index, bool value); | 112 void SetIsUsingGAIAPictureOfProfileAtIndex(size_t index, bool value); |
112 void SetProfileSigninRequiredAtIndex(size_t index, bool value); | 113 void SetProfileSigninRequiredAtIndex(size_t index, bool value); |
113 void SetProfileIsEphemeralAtIndex(size_t index, bool value); | 114 void SetProfileIsEphemeralAtIndex(size_t index, bool value); |
114 void SetProfileIsUsingDefaultNameAtIndex(size_t index, bool value); | 115 void SetProfileIsUsingDefaultNameAtIndex(size_t index, bool value); |
115 void SetProfileIsUsingDefaultAvatarAtIndex(size_t index, bool value); | 116 void SetProfileIsUsingDefaultAvatarAtIndex(size_t index, bool value); |
| 117 void SetProfileIsAuthErrorAtIndex(size_t index, bool value); |
116 | 118 |
117 // Determines whether |name| is one of the default assigned names. | 119 // Determines whether |name| is one of the default assigned names. |
118 bool IsDefaultProfileName(const base::string16& name) const; | 120 bool IsDefaultProfileName(const base::string16& name) const; |
119 | 121 |
120 // Returns unique name that can be assigned to a newly created profile. | 122 // Returns unique name that can be assigned to a newly created profile. |
121 base::string16 ChooseNameForNewProfile(size_t icon_index) const; | 123 base::string16 ChooseNameForNewProfile(size_t icon_index) const; |
122 | 124 |
123 // Returns an avatar icon index that can be assigned to a newly created | 125 // Returns an avatar icon index that can be assigned to a newly created |
124 // profile. Note that the icon may not be unique since there are a limited | 126 // profile. Note that the icon may not be unique since there are a limited |
125 // set of default icons. | 127 // set of default icons. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // This prevents a picture from being downloaded multiple times. The | 226 // This prevents a picture from being downloaded multiple times. The |
225 // ProfileAvatarDownloader instances are deleted when the download completes | 227 // ProfileAvatarDownloader instances are deleted when the download completes |
226 // or when the ProfileInfoCache is destroyed. | 228 // or when the ProfileInfoCache is destroyed. |
227 mutable std::map<std::string, ProfileAvatarDownloader*> | 229 mutable std::map<std::string, ProfileAvatarDownloader*> |
228 avatar_images_downloads_in_progress_; | 230 avatar_images_downloads_in_progress_; |
229 | 231 |
230 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); | 232 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); |
231 }; | 233 }; |
232 | 234 |
233 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ | 235 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ |
OLD | NEW |