OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_USER_MANAGER_BASE_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // Returns a list of users who have logged into this device previously. | 272 // Returns a list of users who have logged into this device previously. |
273 // Same as GetUsers but used if you need to modify User from that list. | 273 // Same as GetUsers but used if you need to modify User from that list. |
274 UserList& GetUsersAndModify(); | 274 UserList& GetUsersAndModify(); |
275 | 275 |
276 // Returns the user with the given email address if found in the persistent | 276 // Returns the user with the given email address if found in the persistent |
277 // list. Returns |NULL| otherwise. | 277 // list. Returns |NULL| otherwise. |
278 const User* FindUserInList(const std::string& user_id) const; | 278 const User* FindUserInList(const std::string& user_id) const; |
279 | 279 |
280 // Returns |true| if user with the given id is found in the persistent list. | 280 // Returns |true| if user with the given id is found in the persistent list. |
281 // Returns |false| otherwise. Does not trigger user loading. | 281 // Returns |false| otherwise. Does not trigger user loading. |
282 const bool UserExistsInList(const std::string& user_id) const; | 282 bool UserExistsInList(const std::string& user_id) const; |
283 | 283 |
284 // Same as FindUserInList but returns non-const pointer to User object. | 284 // Same as FindUserInList but returns non-const pointer to User object. |
285 User* FindUserInListAndModify(const std::string& user_id); | 285 User* FindUserInListAndModify(const std::string& user_id); |
286 | 286 |
287 // Reads user's oauth token status from local state preferences. | 287 // Reads user's oauth token status from local state preferences. |
288 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& user_id) const; | 288 User::OAuthTokenStatus LoadUserOAuthStatus(const std::string& user_id) const; |
289 | 289 |
290 // Read a flag indicating whether online authentication against GAIA should | 290 // Read a flag indicating whether online authentication against GAIA should |
291 // be enforced during the user's next sign-in from local state preferences. | 291 // be enforced during the user's next sign-in from local state preferences. |
292 bool LoadForceOnlineSignin(const std::string& user_id) const; | 292 bool LoadForceOnlineSignin(const std::string& user_id) const; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 scoped_refptr<base::TaskRunner> blocking_task_runner_; | 383 scoped_refptr<base::TaskRunner> blocking_task_runner_; |
384 | 384 |
385 base::WeakPtrFactory<UserManagerBase> weak_factory_; | 385 base::WeakPtrFactory<UserManagerBase> weak_factory_; |
386 | 386 |
387 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); | 387 DISALLOW_COPY_AND_ASSIGN(UserManagerBase); |
388 }; | 388 }; |
389 | 389 |
390 } // namespace user_manager | 390 } // namespace user_manager |
391 | 391 |
392 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ | 392 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_BASE_H_ |
OLD | NEW |