| 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 2a7a0ce758c1af197c9cac94136462562f3f446f..b4fe501b33fbb8233965ca646bbc6587cc7198a5 100644
|
| --- a/chrome/browser/profiles/profile_info_cache.h
|
| +++ b/chrome/browser/profiles/profile_info_cache.h
|
| @@ -62,7 +62,7 @@ class ProfileInfoCache : public ProfileInfoInterface {
|
| // 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.
|
| - int ChooseAvatarIconIndexForNewProfile();
|
| + size_t ChooseAvatarIconIndexForNewProfile() const;
|
|
|
| const FilePath& GetUserDataDir() const;
|
|
|
| @@ -91,6 +91,15 @@ class ProfileInfoCache : public ProfileInfoInterface {
|
| std::string search_key,
|
| const string16& search_name);
|
|
|
| + // Returns true if the given icon index is not in use by another profie.
|
| + bool IconIndexIsUnique(size_t icon_index) const;
|
| +
|
| + // Tries to find an icon index that satisfies all the given conditions.
|
| + // Returns true if an icon was found, false otherwise.
|
| + bool ChooseAvatarIconIndexForNewProfile(bool allow_generic_icon,
|
| + bool must_be_unique,
|
| + size_t* out_icon_index) const;
|
| +
|
| PrefService* prefs_;
|
| std::vector<std::string> sorted_keys_;
|
| FilePath user_data_dir_;
|
|
|