Index: chrome/browser/profiles/profile_info_cache.h |
diff --git a/chrome/browser/profiles/profile_info_cache.h b/chrome/browser/profiles/profile_info_cache.h |
index 345503c59e777a52a9822f0f6fdedc1922deecf5..bd80aeaa43c8b77b2fa498cd502102b40290f50c 100644 |
--- a/chrome/browser/profiles/profile_info_cache.h |
+++ b/chrome/browser/profiles/profile_info_cache.h |
@@ -8,6 +8,7 @@ |
#include <string> |
#include <vector> |
+#include <map> |
Miranda Callahan
2011/11/17 15:21:10
nit: alpha order
sail
2011/11/21 23:52:47
Done.
|
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
@@ -15,13 +16,12 @@ |
#include "base/string16.h" |
#include "chrome/browser/profiles/profile_info_interface.h" |
-namespace gfx { |
-class Image; |
-} |
- |
namespace base { |
class DictionaryValue; |
} |
Robert Sesek
2011/11/17 20:42:04
nit: blank line after
sail
2011/11/21 23:52:47
Done.
|
+namespace gfx { |
+class Image; |
+} |
class PrefService; |
@@ -53,6 +53,12 @@ class ProfileInfoCache : public ProfileInfoInterface { |
size_t index) const OVERRIDE; |
virtual bool GetBackgroundStatusOfProfileAtIndex( |
size_t index) const OVERRIDE; |
+ virtual string16 GetGAIANameOfProfileAtIndex(size_t index) const OVERRIDE; |
+ virtual bool GetIsUsingGAIANameOfProfileAtIndex(size_t index) const OVERRIDE; |
Robert Sesek
2011/11/17 20:42:04
When you return bool, I don't think you need the G
sail
2011/11/21 23:52:47
Done.
|
+ virtual const gfx::Image& GetGAIAPictureOfProfileAtIndex( |
+ size_t index) const OVERRIDE; |
+ virtual bool GetIsUsingGAIAPictureOfProfileAtIndex( |
Robert Sesek
2011/11/17 20:42:04
Same here.
sail
2011/11/21 23:52:47
Done.
|
+ size_t index) const OVERRIDE; |
size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; |
@@ -61,10 +67,17 @@ class ProfileInfoCache : public ProfileInfoInterface { |
void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index); |
void SetBackgroundStatusOfProfileAtIndex(size_t index, |
bool running_background_apps); |
+ void SetGAIANameOfProfileAtIndex(size_t index, const string16& name); |
+ void SetIsUsingGAIANameOfProfileAtIndex(size_t index, bool value); |
+ void SetGAIAPictureOfProfileAtIndex(size_t index, const gfx::Image& image); |
+ void SetIsUsingGAIAPictureOfProfileAtIndex(size_t index, bool value); |
// Returns unique name that can be assigned to a newly created profile. |
string16 ChooseNameForNewProfile(size_t icon_index); |
+ bool GetHasMigratedToGAIAInfoOfProfileAtIndex(size_t index) const; |
Miranda Callahan
2011/11/17 15:21:10
Could you add a comment for these two?
Robert Sesek
2011/11/17 20:42:04
And here.
sail
2011/11/21 23:52:47
Done.
sail
2011/11/21 23:52:47
Done.
|
+ void SetHasMigratedToGAIAInfoOfProfileAtIndex(size_t index, bool value); |
+ |
// Returns an avatar icon index that can be assigned to a newly created |
// profile. Note that the icon may not be unique since there are a limited |
// set of default icons. |
@@ -106,10 +119,19 @@ class ProfileInfoCache : public ProfileInfoInterface { |
bool must_be_unique, |
size_t* out_icon_index) const; |
+ void UpdateSortForProfileIndex(size_t index); |
Miranda Callahan
2011/11/17 15:21:10
Comment for this one, too.
sail
2011/11/21 23:52:47
Done.
|
+ |
+ void OnGAIAPictureLoaded(FilePath path, gfx::Image* image) const; |
+ void OnGAIAPictureSaved(FilePath path, bool success) const; |
+ |
PrefService* prefs_; |
std::vector<std::string> sorted_keys_; |
FilePath user_data_dir_; |
+ // A cache of gaia profile pictures. This cache is updated lazily so it needs |
+ // to be mutable. |
+ mutable std::map<std::string, gfx::Image*> gaia_pictures_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache); |
}; |