| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INFO_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| 11 class ProfileInfoEntry; |
| 12 |
| 11 namespace gfx { | 13 namespace gfx { |
| 12 class Image; | 14 class Image; |
| 13 } | 15 } |
| 14 | 16 |
| 15 // This abstract interface is used to query the profiles backend for information | 17 // This abstract interface is used to query the profiles backend for information |
| 16 // about the different profiles. Its sole concrete implementation is the | 18 // about the different profiles. Its sole concrete implementation is the |
| 17 // ProfileInfoCache. This interface exists largely to assist in testing. | 19 // ProfileInfoCache. This interface exists largely to assist in testing. |
| 18 class ProfileInfoInterface { | 20 class ProfileInfoInterface { |
| 19 public: | 21 public: |
| 20 virtual size_t GetNumberOfProfiles() const = 0; | 22 virtual size_t GetNumberOfProfiles() const = 0; |
| 21 | 23 |
| 22 virtual size_t GetIndexOfProfileWithPath( | 24 virtual std::vector<ProfileInfoEntry> GetProfilesSortedByName() const = 0; |
| 23 const base::FilePath& profile_path) const = 0; | |
| 24 | 25 |
| 25 virtual string16 GetNameOfProfileAtIndex(size_t index) const = 0; | 26 //virtual bool GetInfoForProfile(const FilePath& path, |
| 27 // ProfileInfoEntry* entry) const = 0; |
| 26 | 28 |
| 27 virtual string16 GetShortcutNameOfProfileAtIndex(size_t index) const = 0; | 29 virtual const gfx::Image& GetAvatarIconOfProfile( |
| 30 const base::FilePath& profile_path) const = 0; |
| 31 virtual const gfx::Image* GetGAIAPictureOfProfile( |
| 32 const base::FilePath& profile_path) const = 0; |
| 33 //void SetGAIAPictureOfProfile(const base::FilePath& profile_path, const gfx::
Image* image); |
| 28 | 34 |
| 29 virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const = 0; | |
| 30 | 35 |
| 31 virtual string16 GetUserNameOfProfileAtIndex(size_t index) const = 0; | 36 // *************** Things i am deleting with fire |
| 32 | 37 |
| 33 virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( | 38 //virtual size_t GetIndexOfProfileWithPath( |
| 34 size_t index) const = 0; | 39 // const base::FilePath& profile_path) const = 0; |
| 40 |
| 41 //virtual string16 GetNameOfProfileAtIndex(size_t index) const = 0; |
| 42 |
| 43 //virtual string16 GetShortcutNameOfProfileAtIndex(size_t index) const = 0; |
| 44 |
| 45 //virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const = 0; |
| 46 |
| 47 //virtual string16 GetUserNameOfProfileAtIndex(size_t index) const = 0; |
| 48 |
| 49 //virtual const gfx::Image& GetAvatarIconOfProfileAtIndex( |
| 50 // size_t index) const = 0; |
| 35 | 51 |
| 36 // Returns true if the profile at the given index is currently running any | 52 // Returns true if the profile at the given index is currently running any |
| 37 // background apps. | 53 // background apps. |
| 38 virtual bool GetBackgroundStatusOfProfileAtIndex( | 54 //virtual bool GetBackgroundStatusOfProfileAtIndex( |
| 39 size_t index) const = 0; | 55 // size_t index) const = 0; |
| 40 | 56 |
| 41 virtual string16 GetGAIANameOfProfileAtIndex(size_t index) const = 0; | 57 //virtual string16 GetGAIANameOfProfileAtIndex(size_t index) const = 0; |
| 42 | 58 |
| 43 virtual string16 GetGAIAGivenNameOfProfileAtIndex(size_t index) const = 0; | 59 //virtual string16 GetGAIAGivenNameOfProfileAtIndex(size_t index) const = 0; |
| 44 | 60 |
| 45 // Checks if the GAIA name should be used as the profile's name. | 61 // Checks if the GAIA name should be used as the profile's name. |
| 46 virtual bool IsUsingGAIANameOfProfileAtIndex(size_t index) const = 0; | 62 //virtual bool IsUsingGAIANameOfProfileAtIndex(size_t index) const = 0; |
| 47 | 63 |
| 48 virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex( | 64 //virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex( |
| 49 size_t index) const = 0; | 65 // size_t index) const = 0; |
| 50 | 66 |
| 51 // Checks if the GAIA picture should be used as the profile's avatar icon. | 67 // Checks if the GAIA picture should be used as the profile's avatar icon. |
| 52 virtual bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const = 0; | 68 //virtual bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const = 0; |
| 53 | 69 |
| 54 virtual bool ProfileIsManagedAtIndex(size_t index) const = 0; | 70 //virtual bool ProfileIsManagedAtIndex(size_t index) const = 0; |
| 55 | 71 |
| 56 virtual std::string GetManagedUserIdOfProfileAtIndex(size_t index) const = 0; | 72 //virtual std::string GetManagedUserIdOfProfileAtIndex(size_t index) const = 0
; |
| 57 | 73 |
| 58 // This profile is associated with an account but has been signed-out. | 74 // This profile is associated with an account but has been signed-out. |
| 59 virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const = 0; | 75 //virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const = 0; |
| 60 | 76 |
| 61 // Profile is known to be ephemeral and should be deleted when closed. | 77 // Profile is known to be ephemeral and should be deleted when closed. |
| 62 virtual bool ProfileIsEphemeralAtIndex(size_t index) const = 0; | 78 virtual bool ProfileIsEphemeralAtIndex(size_t index) const = 0; |
| 63 | 79 |
| 64 protected: | 80 protected: |
| 65 virtual ~ProfileInfoInterface() {} | 81 virtual ~ProfileInfoInterface() {} |
| 66 }; | 82 }; |
| 67 | 83 |
| 68 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 84 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
| OLD | NEW |