| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 int GetStatsBrowsingHistory() const; | 92 int GetStatsBrowsingHistory() const; |
| 93 bool HasStatsPasswords() const; | 93 bool HasStatsPasswords() const; |
| 94 int GetStatsPasswords() const; | 94 int GetStatsPasswords() const; |
| 95 bool HasStatsBookmarks() const; | 95 bool HasStatsBookmarks() const; |
| 96 int GetStatsBookmarks() const; | 96 int GetStatsBookmarks() const; |
| 97 bool HasStatsSettings() const; | 97 bool HasStatsSettings() const; |
| 98 int GetStatsSettings() const; | 98 int GetStatsSettings() const; |
| 99 | 99 |
| 100 void SetName(const base::string16& name); | 100 void SetName(const base::string16& name); |
| 101 void SetShortcutName(const base::string16& name); | 101 void SetShortcutName(const base::string16& name); |
| 102 void SetActiveTimeToNow(); |
| 102 void SetIsOmitted(bool is_omitted); | 103 void SetIsOmitted(bool is_omitted); |
| 103 void SetSupervisedUserId(const std::string& id); | 104 void SetSupervisedUserId(const std::string& id); |
| 104 void SetLocalAuthCredentials(const std::string& auth); | 105 void SetLocalAuthCredentials(const std::string& auth); |
| 105 void SetPasswordChangeDetectionToken(const std::string& token); | 106 void SetPasswordChangeDetectionToken(const std::string& token); |
| 106 void SetBackgroundStatus(bool running_background_apps); | 107 void SetBackgroundStatus(bool running_background_apps); |
| 107 void SetGAIAName(const base::string16& name); | 108 void SetGAIAName(const base::string16& name); |
| 108 void SetGAIAGivenName(const base::string16& name); | 109 void SetGAIAGivenName(const base::string16& name); |
| 109 void SetGAIAPicture(const gfx::Image* image); | 110 void SetGAIAPicture(const gfx::Image* image); |
| 110 void SetIsUsingGAIAPicture(bool value); | 111 void SetIsUsingGAIAPicture(bool value); |
| 111 void SetIsSigninRequired(bool value); | 112 void SetIsSigninRequired(bool value); |
| 112 void SetIsEphemeral(bool value); | 113 void SetIsEphemeral(bool value); |
| 113 void SetIsUsingDefaultName(bool value); | 114 void SetIsUsingDefaultName(bool value); |
| 114 void SetIsUsingDefaultAvatar(bool value); | 115 void SetIsUsingDefaultAvatar(bool value); |
| 115 void SetIsAuthError(bool value); | 116 void SetIsAuthError(bool value); |
| 116 void SetAvatarIconIndex(size_t icon_index); | 117 void SetAvatarIconIndex(size_t icon_index); |
| 117 | 118 |
| 118 // Get the statistics of the profile. | 119 // Get the statistics of the profile. |
| 119 void SetStatsBrowsingHistory(int value); | 120 void SetStatsBrowsingHistory(int value); |
| 120 void SetStatsPasswords(int value); | 121 void SetStatsPasswords(int value); |
| 121 void SetStatsBookmarks(int value); | 122 void SetStatsBookmarks(int value); |
| 122 void SetStatsSettings(int value); | 123 void SetStatsSettings(int value); |
| 123 | 124 |
| 124 void SetAuthInfo(const std::string& gaia_id, | 125 void SetAuthInfo(const std::string& gaia_id, const base::string16& user_name); |
| 125 const base::string16& user_name); | |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 // These members are an implementation detail meant to smooth the migration | 128 // These members are an implementation detail meant to smooth the migration |
| 129 // of the ProfileInfoCache to the ProfileAttributesStorage interface. They can | 129 // of the ProfileInfoCache to the ProfileAttributesStorage interface. They can |
| 130 // be safely removed once the ProfileInfoCache stops using indices | 130 // be safely removed once the ProfileInfoCache stops using indices |
| 131 // internally. | 131 // internally. |
| 132 // TODO(anthonyvd): Remove ProfileInfoCache related implementation details | 132 // TODO(anthonyvd): Remove ProfileInfoCache related implementation details |
| 133 // when this class holds the members required to fulfill its own contract. | 133 // when this class holds the members required to fulfill its own contract. |
| 134 friend class ProfileInfoCache; | 134 friend class ProfileInfoCache; |
| 135 void Initialize(ProfileInfoCache* cache, const base::FilePath& path); | 135 void Initialize(ProfileInfoCache* cache, const base::FilePath& path); |
| 136 size_t profile_index() const; | 136 size_t profile_index() const; |
| 137 ProfileInfoCache* profile_info_cache_; | 137 ProfileInfoCache* profile_info_cache_; |
| 138 base::FilePath profile_path_; | 138 base::FilePath profile_path_; |
| 139 | 139 |
| 140 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesEntry); | 140 DISALLOW_COPY_AND_ASSIGN(ProfileAttributesEntry); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_ENTRY_H_ | 143 #endif // CHROME_BROWSER_PROFILES_PROFILE_ATTRIBUTES_ENTRY_H_ |
| OLD | NEW |