| 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 COMPONENTS_USER_MANAGER_KNOWN_USER_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_KNOWN_USER_H_ |
| 6 #define COMPONENTS_USER_MANAGER_KNOWN_USER_H_ | 6 #define COMPONENTS_USER_MANAGER_KNOWN_USER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Saves whether the user authenticates using SAML. | 120 // Saves whether the user authenticates using SAML. |
| 121 void USER_MANAGER_EXPORT UpdateUsingSAML(const AccountId& account_id, | 121 void USER_MANAGER_EXPORT UpdateUsingSAML(const AccountId& account_id, |
| 122 const bool using_saml); | 122 const bool using_saml); |
| 123 | 123 |
| 124 // Returns if SAML needs to be used for authentication of the user with | 124 // Returns if SAML needs to be used for authentication of the user with |
| 125 // |account_id|, if it is known (was set by a |UpdateUsingSaml| call). | 125 // |account_id|, if it is known (was set by a |UpdateUsingSaml| call). |
| 126 // Otherwise | 126 // Otherwise |
| 127 // returns false. | 127 // returns false. |
| 128 bool USER_MANAGER_EXPORT IsUsingSAML(const AccountId& account_id); | 128 bool USER_MANAGER_EXPORT IsUsingSAML(const AccountId& account_id); |
| 129 | 129 |
| 130 // Returns true if the user's session has already completed initialization |
| 131 // (set to false when session is created, and then is set to true once |
| 132 // the profile is intiaiized - this allows us to detect crashes/restarts during |
| 133 // initial session creation so we can recover gracefully). |
| 134 bool USER_MANAGER_EXPORT WasProfileEverInitialized(const AccountId& account_id); |
| 135 |
| 136 // Sets the flag that denotes whether the session associated with a user has |
| 137 // completed initialization at least once. |
| 138 void USER_MANAGER_EXPORT SetProfileEverInitialized(const AccountId& account_id, |
| 139 bool initialized); |
| 140 |
| 130 // Saves why the user has to go through re-auth flow. | 141 // Saves why the user has to go through re-auth flow. |
| 131 void USER_MANAGER_EXPORT UpdateReauthReason(const AccountId& account_id, | 142 void USER_MANAGER_EXPORT UpdateReauthReason(const AccountId& account_id, |
| 132 const int reauth_reason); | 143 const int reauth_reason); |
| 133 | 144 |
| 134 // Returns the reason why the user with |account_id| has to go through the | 145 // Returns the reason why the user with |account_id| has to go through the |
| 135 // re-auth flow. Returns true if such a reason was recorded or false | 146 // re-auth flow. Returns true if such a reason was recorded or false |
| 136 // otherwise. | 147 // otherwise. |
| 137 bool USER_MANAGER_EXPORT FindReauthReason(const AccountId& account_id, | 148 bool USER_MANAGER_EXPORT FindReauthReason(const AccountId& account_id, |
| 138 int* out_value); | 149 int* out_value); |
| 139 | 150 |
| 140 // Removes all user preferences associated with |account_id|. | 151 // Removes all user preferences associated with |account_id|. |
| 141 // (This one used by user_manager only and thus not exported.) | 152 // Not exported as code should not be calling this outside this component |
| 153 // (with the exception of tests, so a test-only API is exposed). |
| 142 void RemovePrefs(const AccountId& account_id); | 154 void RemovePrefs(const AccountId& account_id); |
| 155 void USER_MANAGER_EXPORT RemovePrefsForTesting(const AccountId& account_id); |
| 143 | 156 |
| 144 // Register known user prefs. | 157 // Register known user prefs. |
| 145 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry); | 158 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry); |
| 146 } | 159 } |
| 147 } // namespace user_manager | 160 } // namespace user_manager |
| 148 | 161 |
| 149 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_ | 162 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_ |
| OLD | NEW |