| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ATTRIBUTES_STORAGE_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 const base::string16& user_name, | 37 const base::string16& user_name, |
| 38 size_t icon_index, | 38 size_t icon_index, |
| 39 const std::string& supervised_user_id) = 0; | 39 const std::string& supervised_user_id) = 0; |
| 40 // Removes the profile at |profile_path| from this storage. Does not delete or | 40 // Removes the profile at |profile_path| from this storage. Does not delete or |
| 41 // affect the actual profile's data. | 41 // affect the actual profile's data. |
| 42 virtual void RemoveProfile(const base::FilePath& profile_path) = 0; | 42 virtual void RemoveProfile(const base::FilePath& profile_path) = 0; |
| 43 | 43 |
| 44 // Returns a vector containing one attributes entry per known profile. They | 44 // Returns a vector containing one attributes entry per known profile. They |
| 45 // are not sorted in any particular order. | 45 // are not sorted in any particular order. |
| 46 virtual std::vector<ProfileAttributesEntry*> GetAllProfilesAttributes() = 0; | 46 virtual std::vector<ProfileAttributesEntry*> GetAllProfilesAttributes() = 0; |
| 47 virtual std::vector<ProfileAttributesEntry*> |
| 48 GetAllProfilesAttributesSortedByName() = 0; |
| 47 | 49 |
| 48 // Populates |entry| with the data for the profile at |path| and returns true | 50 // Populates |entry| with the data for the profile at |path| and returns true |
| 49 // if the operation is successful and |entry| can be used. Returns false | 51 // if the operation is successful and |entry| can be used. Returns false |
| 50 // otherwise. | 52 // otherwise. |
| 51 // |entry| should not be cached as it may not reflect subsequent changes to | 53 // |entry| should not be cached as it may not reflect subsequent changes to |
| 52 // the profile's metadata. | 54 // the profile's metadata. |
| 53 virtual bool GetProfileAttributesWithPath( | 55 virtual bool GetProfileAttributesWithPath( |
| 54 const base::FilePath& path, ProfileAttributesEntry** entry) = 0; | 56 const base::FilePath& path, ProfileAttributesEntry** entry) = 0; |
| 55 | 57 |
| 56 // Returns the count of known profiles. | 58 // Returns the count of known profiles. |
| 57 virtual size_t GetNumberOfProfiles() const = 0; | 59 virtual size_t GetNumberOfProfiles() const = 0; |
| 58 | 60 |
| 59 virtual void AddObserver(ProfileAttributesStorage::Observer* observer) = 0; | 61 virtual void AddObserver(ProfileAttributesStorage::Observer* observer) = 0; |
| 60 virtual void RemoveObserver(ProfileAttributesStorage::Observer* observer) = 0; | 62 virtual void RemoveObserver(ProfileAttributesStorage::Observer* observer) = 0; |
| 61 | 63 |
| 62 private: | 64 private: |
| 63 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesStorage); | 65 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesStorage); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ | 68 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_STORAGE_H_ |
| OLD | NEW |