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_H_ | 5 #ifndef COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 6 #define COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/user_manager/user.h" | 10 #include "components/user_manager/user.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 // Returns if SAML needs to be used for authentication of the user with | 376 // Returns if SAML needs to be used for authentication of the user with |
377 // |user_id|, if it is known (was set by a |UpdateUsingSaml| call). Otherwise | 377 // |user_id|, if it is known (was set by a |UpdateUsingSaml| call). Otherwise |
378 // returns false. | 378 // returns false. |
379 virtual bool FindUsingSAML(const UserID& user_id) = 0; | 379 virtual bool FindUsingSAML(const UserID& user_id) = 0; |
380 | 380 |
381 // Setter and getter for DeviceId known user string preference. | 381 // Setter and getter for DeviceId known user string preference. |
382 virtual void SetKnownUserDeviceId(const UserID& user_id, | 382 virtual void SetKnownUserDeviceId(const UserID& user_id, |
383 const std::string& device_id) = 0; | 383 const std::string& device_id) = 0; |
384 virtual std::string GetKnownUserDeviceId(const UserID& user_id) = 0; | 384 virtual std::string GetKnownUserDeviceId(const UserID& user_id) = 0; |
385 | 385 |
| 386 // Setter and getter for GAPSCookie known user string preference. |
| 387 virtual void SetKnownUserGAPSCookie(const UserID& user_id, |
| 388 const std::string& gaps_cookie) = 0; |
| 389 |
| 390 virtual std::string GetKnownUserGAPSCookie(const UserID& user_id) = 0; |
| 391 |
386 // Saves why the user has to go through re-auth flow. | 392 // Saves why the user has to go through re-auth flow. |
387 virtual void UpdateReauthReason(const UserID& user_id, | 393 virtual void UpdateReauthReason(const UserID& user_id, |
388 const int reauth_reason) = 0; | 394 const int reauth_reason) = 0; |
389 | 395 |
390 // Returns the reason why the user with |user_id| has to go through the | 396 // Returns the reason why the user with |user_id| has to go through the |
391 // re-auth flow. Returns true if such a reason was recorded or false | 397 // re-auth flow. Returns true if such a reason was recorded or false |
392 // otherwise. | 398 // otherwise. |
393 virtual bool FindReauthReason(const UserID& user_id, int* out_value) = 0; | 399 virtual bool FindReauthReason(const UserID& user_id, int* out_value) = 0; |
394 | 400 |
395 protected: | 401 protected: |
(...skipping 14 matching lines...) Expand all Loading... |
410 static UserManager* GetForTesting(); | 416 static UserManager* GetForTesting(); |
411 | 417 |
412 // Sets UserManager instance to the given |user_manager|. | 418 // Sets UserManager instance to the given |user_manager|. |
413 // Returns the previous value of the instance. | 419 // Returns the previous value of the instance. |
414 static UserManager* SetForTesting(UserManager* user_manager); | 420 static UserManager* SetForTesting(UserManager* user_manager); |
415 }; | 421 }; |
416 | 422 |
417 } // namespace user_manager | 423 } // namespace user_manager |
418 | 424 |
419 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ | 425 #endif // COMPONENTS_USER_MANAGER_USER_MANAGER_H_ |
OLD | NEW |