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 CHROMEOS_LOGIN_USER_NAMES_H_ | 5 #ifndef CHROMEOS_LOGIN_USER_NAMES_H_ |
6 #define CHROMEOS_LOGIN_USER_NAMES_H_ | 6 #define CHROMEOS_LOGIN_USER_NAMES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/user_manager/user_manager_export.h" | 10 #include "components/user_manager/user_manager_export.h" |
11 | 11 |
12 class AccountId; | 12 class AccountId; |
13 | 13 |
14 namespace user_manager { | 14 namespace user_manager { |
15 | 15 |
16 // Username for stub login when not running on ChromeOS. | 16 // Username for stub login for tests only. |
17 // It is also used for Chrome for ChromeOS linux dev build. | |
17 USER_MANAGER_EXPORT extern const char kStubUser[]; | 18 USER_MANAGER_EXPORT extern const char kStubUser[]; |
18 | 19 |
20 USER_MANAGER_EXPORT const AccountId& StubAccountId(); | |
21 | |
22 #if defined(OS_CHROMEOS) | |
xiyuan
2016/10/27 18:25:59
Why do we need to make it chromeos specific? Can w
Alexander Alekseev
2016/10/28 11:10:25
Done.
| |
19 // Magic e-mail addresses are bad. They exist here because some code already | 23 // Magic e-mail addresses are bad. They exist here because some code already |
20 // depends on them and it is hard to figure out what. Any user types added in | 24 // depends on them and it is hard to figure out what. Any user types added in |
21 // the future should be identified by a new |UserType|, not a new magic e-mail | 25 // the future should be identified by a new |UserType|, not a new magic e-mail |
22 // address. | 26 // address. |
23 // Username for Guest session user. | 27 // Username for Guest session user. |
24 USER_MANAGER_EXPORT extern const char kGuestUserName[]; | 28 USER_MANAGER_EXPORT extern const char kGuestUserName[]; |
25 | 29 |
26 // Domain that is used for all supervised users. | 30 // Domain that is used for all supervised users. |
27 USER_MANAGER_EXPORT extern const char kSupervisedUserDomain[]; | 31 USER_MANAGER_EXPORT extern const char kSupervisedUserDomain[]; |
28 | 32 |
29 // Canonicalizes a GAIA user ID, accounting for the legacy guest mode user ID | 33 // Canonicalizes a GAIA user ID, accounting for the legacy guest mode user ID |
30 // which does trips up gaia::CanonicalizeEmail() because it does not contain an | 34 // which does trips up gaia::CanonicalizeEmail() because it does not contain an |
31 // @ symbol. | 35 // @ symbol. |
32 USER_MANAGER_EXPORT std::string CanonicalizeUserID(const std::string& user_id); | 36 USER_MANAGER_EXPORT std::string CanonicalizeUserID(const std::string& user_id); |
33 | 37 |
34 USER_MANAGER_EXPORT const AccountId& StubAccountId(); | |
35 | |
36 // AccountId for the login screen. It identifies ephemeral profile that is used | 38 // AccountId for the login screen. It identifies ephemeral profile that is used |
37 // to display WebUI during OOBE and SignIn. | 39 // to display WebUI during OOBE and SignIn. |
38 USER_MANAGER_EXPORT const AccountId& SignInAccountId(); | 40 USER_MANAGER_EXPORT const AccountId& SignInAccountId(); |
39 | 41 |
40 USER_MANAGER_EXPORT const AccountId& GuestAccountId(); | 42 USER_MANAGER_EXPORT const AccountId& GuestAccountId(); |
41 | 43 |
42 USER_MANAGER_EXPORT const AccountId& DemoAccountId(); | 44 USER_MANAGER_EXPORT const AccountId& DemoAccountId(); |
45 #endif | |
43 | 46 |
44 } // namespace user_manager | 47 } // namespace user_manager |
45 | 48 |
46 #endif // CHROMEOS_LOGIN_USER_NAMES_H_ | 49 #endif // CHROMEOS_LOGIN_USER_NAMES_H_ |
OLD | NEW |