Chromium Code Reviews| 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 38edaa2ca68faa0e8d9eed414d9d59073d84d743..6f189aaed0c4fea16eb29df2ba1f5ca68236d4ce 100644 |
| --- a/chrome/browser/profiles/profile_info_cache.h |
| +++ b/chrome/browser/profiles/profile_info_cache.h |
| @@ -15,6 +15,8 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "base/observer_list.h" |
| #include "base/strings/string16.h" |
| +#include "chrome/browser/profiles/profile_attributes_entry.h" |
| +#include "chrome/browser/profiles/profile_attributes_storage.h" |
| #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| #include "chrome/browser/profiles/profile_info_interface.h" |
| @@ -34,6 +36,7 @@ class ProfileAvatarDownloader; |
| // This cache can be used to display a list of profiles without having to |
| // actually load the profiles from disk. |
| class ProfileInfoCache : public ProfileInfoInterface, |
| + public ProfileAttributesStorage, |
| public base::SupportsWeakPtr<ProfileInfoCache> { |
| public: |
| ProfileInfoCache(PrefService* prefs, const base::FilePath& user_data_dir); |
| @@ -161,6 +164,19 @@ class ProfileInfoCache : public ProfileInfoInterface, |
| disable_avatar_download_for_testing_ = disable_avatar_download_for_testing; |
| } |
| + // ProfileMetadataStorage: |
|
Mike Lerman
2015/07/08 18:26:35
Perhaps note that these methods are experimental,
anthonyvd
2015/07/09 17:02:14
Well I'd argue the opposite. If someone were to be
Mike Lerman
2015/07/09 20:47:27
SGTM.
|
| + void AddProfile(const base::FilePath& profile_path, |
| + const base::string16& name, |
| + const std::string& gaia_id, |
| + const base::string16& user_name, |
| + size_t icon_index, |
| + const std::string& supervised_user_id) override; |
| + void DeleteProfile(const base::FilePath& profile_path) override; |
| + std::vector<ProfileAttributesEntry*> GetAllProfilesAttributes() override; |
| + bool GetProfileAttributesWithPath( |
| + const base::FilePath& path, |
| + ProfileAttributesEntry** entry) override; |
| + |
| private: |
| FRIEND_TEST_ALL_PREFIXES(ProfileInfoCacheTest, DownloadHighResAvatarTest); |
| FRIEND_TEST_ALL_PREFIXES(ProfileInfoCacheTest, |
| @@ -220,6 +236,7 @@ class ProfileInfoCache : public ProfileInfoInterface, |
| PrefService* prefs_; |
| std::vector<std::string> sorted_keys_; |
| + std::map<base::FilePath, ProfileAttributesEntry> profile_attributes_entries_; |
| base::FilePath user_data_dir_; |
| mutable base::ObserverList<ProfileInfoCacheObserver> observer_list_; |