Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10499)

Unified Diff: chrome/browser/profiles/profile_info_cache.h

Issue 8511064: GAIA Profile info prototype (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3f084073b6133d71d349d3fdac5e52080a34e26d 100644
--- a/chrome/browser/profiles/profile_info_cache.h
+++ b/chrome/browser/profiles/profile_info_cache.h
@@ -8,12 +8,14 @@
#include <string>
#include <vector>
+#include <map>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
#include "base/string16.h"
#include "chrome/browser/profiles/profile_info_interface.h"
+#include "third_party/skia/include/core/SkBitmap.h"
namespace gfx {
class Image;
@@ -47,16 +49,31 @@ class ProfileInfoCache : public ProfileInfoInterface {
virtual size_t GetIndexOfProfileWithPath(
const FilePath& profile_path) const OVERRIDE;
virtual string16 GetNameOfProfileAtIndex(size_t index) const OVERRIDE;
+ virtual string16 GetGAIANameOfProfileAtIndex(size_t index) const OVERRIDE;
+ virtual SkBitmap GetGAIAPictureOfProfileAtIndex(size_t index) const OVERRIDE;
virtual FilePath GetPathOfProfileAtIndex(size_t index) const OVERRIDE;
virtual string16 GetUserNameOfProfileAtIndex(size_t index) const OVERRIDE;
- virtual const gfx::Image& GetAvatarIconOfProfileAtIndex(
+ virtual gfx::Image GetAvatarIconOfProfileAtIndex(
size_t index) const OVERRIDE;
virtual bool GetBackgroundStatusOfProfileAtIndex(
size_t index) const OVERRIDE;
+ virtual bool IsUsingCustomAvatarIconForProfileAtIndex(
+ size_t index) const;
+ virtual void SetIsUsingCustomAvatarIconForProfileAtIndex(
+ size_t index, bool value);
+
+ virtual bool IsUsinGAIANameForProfileAtIndex(
+ size_t index) const;
+ virtual void SetIsUsingGAIANameForProfileAtIndex(
+ size_t index, bool value);
+
size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const;
void SetNameOfProfileAtIndex(size_t index, const string16& name);
+ void SetGAIANameOfProfileAtIndex(size_t index, const string16& name);
+ void SetGAIAPictureOfProfileAtIndex(size_t index,
+ const SkBitmap& bitmap);
void SetUserNameOfProfileAtIndex(size_t index, const string16& user_name);
void SetAvatarIconOfProfileAtIndex(size_t index, size_t icon_index);
void SetBackgroundStatusOfProfileAtIndex(size_t index,
@@ -106,9 +123,19 @@ class ProfileInfoCache : public ProfileInfoInterface {
bool must_be_unique,
size_t* out_icon_index) const;
+ FilePath GetImagePath(std::string key,
+ string16 file_name);
+ void ReadBitmap(std::string key,
+ string16 file_name,
+ SkBitmap* bmp);
+ void SaveBitmap(std::string key,
+ string16 file_name,
+ const SkBitmap& image);
+
PrefService* prefs_;
std::vector<std::string> sorted_keys_;
FilePath user_data_dir_;
+ mutable std::map<std::string, SkBitmap*> bitmaps_;
DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache);
};
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698