| Index: chromeos/login/user_names.cc
|
| diff --git a/chromeos/login/user_names.cc b/chromeos/login/user_names.cc
|
| index 52ed05362e23881db9dc346df670f19346ac9562..f39acd1d055e5b47a45d6b1a37db22020dfdf9f5 100644
|
| --- a/chromeos/login/user_names.cc
|
| +++ b/chromeos/login/user_names.cc
|
| @@ -3,27 +3,45 @@
|
| // found in the LICENSE file.
|
| #include "chromeos/login/user_names.h"
|
|
|
| +#include "components/user_manager/user_id.h"
|
| #include "google_apis/gaia/gaia_auth_util.h"
|
|
|
| -namespace chromeos {
|
| +namespace {
|
|
|
| -namespace login {
|
| +// Should match cros constant in platform/libchromeos/chromeos/cryptohome.h
|
| +const char* kGuestUserName = "$guest";
|
| +
|
| +const char* kSignInUser = "sign-in-user-id";
|
|
|
| const char* kStubUser = "stub-user@example.com";
|
| +} // anonymous namespace
|
|
|
| -const char* kSignInUser = "sign-in-user-id";
|
| +namespace chromeos {
|
|
|
| -// Should match cros constant in platform/libchromeos/chromeos/cryptohome.h
|
| -const char* kGuestUserName = "$guest";
|
| +namespace login {
|
| +
|
| +const char* kLegacyGuestUserName = kGuestUserName;
|
|
|
| const char* kSupervisedUserDomain = "locally-managed.localhost";
|
|
|
| std::string CanonicalizeUserID(const std::string& user_id) {
|
| - if (user_id == chromeos::login::kGuestUserName)
|
| + if (user_id == kGuestUserName)
|
| return user_id;
|
| return gaia::CanonicalizeEmail(user_id);
|
| }
|
|
|
| +user_manager::UserID GetSignInUserID() {
|
| + return user_manager::UserID(std::string() /* gaia_id */, kSignInUser);
|
| +}
|
| +
|
| +user_manager::UserID GetGuestUserID() {
|
| + return user_manager::UserID(std::string() /* gaia_id */, kGuestUserName);
|
| +}
|
| +
|
| +user_manager::UserID GetStubUserID() {
|
| + return user_manager::UserID(std::string() /* gaia_id */, kStubUser);
|
| +}
|
| +
|
| } // namespace login
|
|
|
| } // namespace chromeos
|
|
|