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 // (exported so it can be used in tests). |
142 void RemovePrefs(const AccountId& account_id); | 153 void USER_MANAGER_EXPORT RemovePrefs(const AccountId& account_id); |
Alexander Alekseev
2017/03/09 02:04:04
nit: Could you leave this private, and create a ne
Andrew T Wilson (Slow)
2017/03/09 12:33:15
Done.
| |
143 | 154 |
144 // Register known user prefs. | 155 // Register known user prefs. |
145 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry); | 156 void USER_MANAGER_EXPORT RegisterPrefs(PrefRegistrySimple* registry); |
146 } | 157 } |
147 } // namespace user_manager | 158 } // namespace user_manager |
148 | 159 |
149 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_ | 160 #endif // COMPONENTS_USER_MANAGER_KNOWN_USER_H_ |
OLD | NEW |