Chromium Code Reviews| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 // ProfileInfoInterface: | 50 // ProfileInfoInterface: |
| 51 virtual size_t GetNumberOfProfiles() const OVERRIDE; | 51 virtual size_t GetNumberOfProfiles() const OVERRIDE; |
| 52 // Don't cache this value and reuse, because resorting the menu could cause | 52 // Don't cache this value and reuse, because resorting the menu could cause |
| 53 // the item being referred to to change out from under you. | 53 // the item being referred to to change out from under you. |
| 54 virtual size_t GetIndexOfProfileWithPath( | 54 virtual size_t GetIndexOfProfileWithPath( |
| 55 const base::FilePath& profile_path) const OVERRIDE; | 55 const base::FilePath& profile_path) const OVERRIDE; |
| 56 virtual base::string16 GetNameOfProfileAtIndex(size_t index) const OVERRIDE; | 56 virtual base::string16 GetNameOfProfileAtIndex(size_t index) const OVERRIDE; |
| 57 virtual base::string16 GetShortcutNameOfProfileAtIndex(size_t index) | 57 virtual base::string16 GetShortcutNameOfProfileAtIndex(size_t index) |
| 58 const OVERRIDE; | 58 const OVERRIDE; |
| 59 virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const OVERRIDE; | 59 virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const OVERRIDE; |
| 60 virtual base::Time GetProfileActive(size_t index) const OVERRIDE; | |
|
noms (inactive)
2014/01/13 16:39:44
I think the function should end in "AtIndex", to b
bcwhite
2014/01/13 17:05:48
Done.
| |
| 60 virtual base::string16 GetUserNameOfProfileAtIndex( | 61 virtual base::string16 GetUserNameOfProfileAtIndex( |
| 61 size_t index) const OVERRIDE; | 62 size_t index) const OVERRIDE; |
| 62 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( | 63 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( |
| 63 size_t index) const OVERRIDE; | 64 size_t index) const OVERRIDE; |
| 64 virtual std::string GetLocalAuthCredentialsOfProfileAtIndex( | 65 virtual std::string GetLocalAuthCredentialsOfProfileAtIndex( |
| 65 size_t index) const OVERRIDE; | 66 size_t index) const OVERRIDE; |
| 66 // Note that a return value of false could mean an error in collection or | 67 // Note that a return value of false could mean an error in collection or |
| 67 // that there are currently no background apps running. However, the action | 68 // that there are currently no background apps running. However, the action |
| 68 // which results is the same in both cases (thus far). | 69 // which results is the same in both cases (thus far). |
| 69 virtual bool GetBackgroundStatusOfProfileAtIndex( | 70 virtual bool GetBackgroundStatusOfProfileAtIndex( |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 81 virtual bool IsUsingGAIAPictureOfProfileAtIndex( | 82 virtual bool IsUsingGAIAPictureOfProfileAtIndex( |
| 82 size_t index) const OVERRIDE; | 83 size_t index) const OVERRIDE; |
| 83 virtual bool ProfileIsManagedAtIndex(size_t index) const OVERRIDE; | 84 virtual bool ProfileIsManagedAtIndex(size_t index) const OVERRIDE; |
| 84 virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const OVERRIDE; | 85 virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const OVERRIDE; |
| 85 virtual std::string GetManagedUserIdOfProfileAtIndex(size_t index) const | 86 virtual std::string GetManagedUserIdOfProfileAtIndex(size_t index) const |
| 86 OVERRIDE; | 87 OVERRIDE; |
| 87 virtual bool ProfileIsEphemeralAtIndex(size_t index) const OVERRIDE; | 88 virtual bool ProfileIsEphemeralAtIndex(size_t index) const OVERRIDE; |
| 88 | 89 |
| 89 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; | 90 size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; |
| 90 | 91 |
| 92 void SetProfileActive(size_t index); | |
|
noms (inactive)
2014/01/13 16:39:44
Same comment as above
bcwhite
2014/01/13 17:05:48
Done.
| |
| 91 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); | 93 void SetNameOfProfileAtIndex(size_t index, const base::string16& name); |
| 92 void SetShortcutNameOfProfileAtIndex(size_t index, | 94 void SetShortcutNameOfProfileAtIndex(size_t index, |
| 93 const base::string16& name); | 95 const base::string16& name); |
| 94 void SetUserNameOfProfileAtIndex(size_t index, | 96 void SetUserNameOfProfileAtIndex(size_t index, |
| 95 const base::string16& user_name); | 97 const base::string16& user_name); |
| 96 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); | 98 void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); |
| 97 void SetManagedUserIdOfProfileAtIndex(size_t index, const std::string& id); | 99 void SetManagedUserIdOfProfileAtIndex(size_t index, const std::string& id); |
| 98 void SetLocalAuthCredentialsOfProfileAtIndex(size_t index, | 100 void SetLocalAuthCredentialsOfProfileAtIndex(size_t index, |
| 99 const std::string& auth); | 101 const std::string& auth); |
| 100 void SetBackgroundStatusOfProfileAtIndex(size_t index, | 102 void SetBackgroundStatusOfProfileAtIndex(size_t index, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 // to be mutable. | 193 // to be mutable. |
| 192 mutable std::map<std::string, gfx::Image*> gaia_pictures_; | 194 mutable std::map<std::string, gfx::Image*> gaia_pictures_; |
| 193 // Marks a gaia profile picture as loading. This prevents a picture from | 195 // Marks a gaia profile picture as loading. This prevents a picture from |
| 194 // loading multiple times. | 196 // loading multiple times. |
| 195 mutable std::map<std::string, bool> gaia_pictures_loading_; | 197 mutable std::map<std::string, bool> gaia_pictures_loading_; |
| 196 | 198 |
| 197 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); | 199 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); |
| 198 }; | 200 }; |
| 199 | 201 |
| 200 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ | 202 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_H_ |
| OLD | NEW |