| 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 namespace base { | 11 namespace base { |
| 12 class Time; | 12 class Time; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Image; | 16 class Image; |
| 17 } | 17 } |
| 18 | 18 |
| 19 // This abstract interface is used to query the profiles backend for information | 19 // This abstract interface is used to query the profiles backend for information |
| 20 // about the different profiles. Its sole concrete implementation is the | 20 // about the different profiles. Its sole concrete implementation is the |
| 21 // ProfileInfoCache. This interface exists largely to assist in testing. | 21 // ProfileInfoCache. This interface exists largely to assist in testing. |
| 22 // The ProfileInfoInterface is being deprecated. Prefer using the |
| 23 // ProfileAttributesStorage and avoid using the Get*AtIndex family of functions. |
| 22 class ProfileInfoInterface { | 24 class ProfileInfoInterface { |
| 23 public: | 25 public: |
| 24 virtual size_t GetNumberOfProfiles() const = 0; | 26 virtual size_t GetNumberOfProfiles() const = 0; |
| 25 | 27 |
| 26 virtual size_t GetIndexOfProfileWithPath( | 28 virtual size_t GetIndexOfProfileWithPath( |
| 27 const base::FilePath& profile_path) const = 0; | 29 const base::FilePath& profile_path) const = 0; |
| 28 | 30 |
| 29 virtual base::Time GetProfileActiveTimeAtIndex(size_t index) const = 0; | 31 virtual base::Time GetProfileActiveTimeAtIndex(size_t index) const = 0; |
| 30 | 32 |
| 31 virtual base::string16 GetNameOfProfileAtIndex(size_t index) const = 0; | 33 virtual base::string16 GetNameOfProfileAtIndex(size_t index) const = 0; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const = 0; | 94 virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const = 0; |
| 93 | 95 |
| 94 // Returns true if the given profile is connected to an account. | 96 // Returns true if the given profile is connected to an account. |
| 95 virtual bool ProfileIsAuthenticatedAtIndex(size_t index) const = 0; | 97 virtual bool ProfileIsAuthenticatedAtIndex(size_t index) const = 0; |
| 96 | 98 |
| 97 protected: | 99 protected: |
| 98 virtual ~ProfileInfoInterface() {} | 100 virtual ~ProfileInfoInterface() {} |
| 99 }; | 101 }; |
| 100 | 102 |
| 101 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ | 103 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_INTERFACE_H_ |
| OLD | NEW |