Chromium Code Reviews| 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_ENTRY_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_ENTRY_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_ENTRY_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_ENTRY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 // the profile icons selectable at profile creation. | 79 // the profile icons selectable at profile creation. |
| 80 bool IsUsingDefaultAvatar() const; | 80 bool IsUsingDefaultAvatar() const; |
| 81 // Returns true if the profile is signed in but is in an authentication error | 81 // Returns true if the profile is signed in but is in an authentication error |
| 82 // state. | 82 // state. |
| 83 bool IsAuthError() const; | 83 bool IsAuthError() const; |
| 84 // Returns the index of the default icon used by the profile. | 84 // Returns the index of the default icon used by the profile. |
| 85 size_t GetAvatarIconIndex() const; | 85 size_t GetAvatarIconIndex() const; |
| 86 | 86 |
| 87 void SetName(const base::string16& name); | 87 void SetName(const base::string16& name); |
| 88 void SetShortcutName(const base::string16& name); | 88 void SetShortcutName(const base::string16& name); |
| 89 void SetActiveTime(); | |
| 89 void SetIsOmitted(bool is_omitted); | 90 void SetIsOmitted(bool is_omitted); |
| 90 void SetSupervisedUserId(const std::string& id); | 91 void SetSupervisedUserId(const std::string& id); |
| 91 void SetLocalAuthCredentials(const std::string& auth); | 92 void SetLocalAuthCredentials(const std::string& auth); |
| 92 void SetPasswordChangeDetectionToken(const std::string& token); | 93 void SetPasswordChangeDetectionToken(const std::string& token); |
| 93 void SetBackgroundStatus(bool running_background_apps); | 94 void SetBackgroundStatus(bool running_background_apps); |
| 94 void SetGAIAName(const base::string16& name); | 95 void SetGAIAName(const base::string16& name); |
| 95 void SetGAIAGivenName(const base::string16& name); | 96 void SetGAIAGivenName(const base::string16& name); |
| 96 void SetGAIAPicture(const gfx::Image* image); | 97 void SetGAIAPicture(const gfx::Image* image); |
| 97 void SetIsUsingGAIAPicture(bool value); | 98 void SetIsUsingGAIAPicture(bool value); |
| 98 void SetIsSigninRequired(bool value); | 99 void SetIsSigninRequired(bool value); |
| 99 void SetIsEphemeral(bool value); | 100 void SetIsEphemeral(bool value); |
| 100 void SetIsUsingDefaultName(bool value); | 101 void SetIsUsingDefaultName(bool value); |
| 101 void SetIsUsingDefaultAvatar(bool value); | 102 void SetIsUsingDefaultAvatar(bool value); |
| 102 void SetIsAuthError(bool value); | 103 void SetIsAuthError(bool value); |
| 103 void SetAvatarIconIndex(size_t icon_index); | 104 void SetAvatarIconIndex(size_t icon_index); |
| 104 | 105 |
| 105 void SetAuthInfo(const std::string& gaia_id, | 106 void SetAuthInfo(const std::string& gaia_id, |
| 106 const base::string16& user_name); | 107 const base::string16& user_name); |
| 107 | 108 |
| 109 bool LessThan(const ProfileAttributesEntry& other) const; | |
|
Mike Lerman
2015/08/06 16:06:19
Add a comment here? It's unclear how we're compari
| |
| 110 | |
| 108 private: | 111 private: |
| 109 // These members are an implementation detail meant to smooth the migration | 112 // These members are an implementation detail meant to smooth the migration |
| 110 // of the ProfileInfoCache to the ProfileAttributesStorage interface. They can | 113 // of the ProfileInfoCache to the ProfileAttributesStorage interface. They can |
| 111 // be safely removed once the ProfileInfoCache stops using indices | 114 // be safely removed once the ProfileInfoCache stops using indices |
| 112 // internally. | 115 // internally. |
| 113 // TODO(anthonyvd): Remove ProfileInfoCache related implementation details | 116 // TODO(anthonyvd): Remove ProfileInfoCache related implementation details |
| 114 // when this class holds the members required to fulfill its own contract. | 117 // when this class holds the members required to fulfill its own contract. |
| 115 friend class ProfileInfoCache; | 118 friend class ProfileInfoCache; |
| 116 void Initialize(ProfileInfoCache* cache, const base::FilePath& path); | 119 void Initialize(ProfileInfoCache* cache, const base::FilePath& path); |
| 117 size_t profile_index() const; | 120 size_t profile_index() const; |
| 118 ProfileInfoCache* profile_info_cache_; | 121 ProfileInfoCache* profile_info_cache_; |
| 119 base::FilePath profile_path_; | 122 base::FilePath profile_path_; |
| 120 | 123 |
| 121 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesEntry); | 124 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesEntry); |
| 122 }; | 125 }; |
| 123 | 126 |
| 124 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_ENTRY_H_ | 127 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_ENTRY_H_ |
| OLD | NEW |