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 ASH_PUBLIC_CPP_SESSION_TYPES_H_ | 5 #ifndef ASH_PUBLIC_CPP_SESSION_TYPES_H_ |
6 #define ASH_PUBLIC_CPP_SESSION_TYPES_H_ | 6 #define ASH_PUBLIC_CPP_SESSION_TYPES_H_ |
7 | 7 |
8 namespace ash { | 8 namespace ash { |
9 | 9 |
10 // The index of the user profile to use. The list is always LRU sorted so that | 10 // The index of the user profile to use. The list is always LRU sorted so that |
11 // index 0 is the currently active user. | 11 // index 0 is the currently active user. |
12 using UserIndex = int; | 12 using UserIndex = int; |
13 | 13 |
14 // Represents possible user adding scenarios. | 14 // Represents possible user adding scenarios. |
15 enum class AddUserSessionPolicy { | 15 enum class AddUserSessionPolicy { |
16 // Adding a user is allowed. | 16 // Adding a user is allowed. |
17 ALLOWED, | 17 ALLOWED, |
18 // Disallowed due to primary user's policy. | 18 // Disallowed due to primary user's policy. |
19 ERROR_NOT_ALLOWED_PRIMARY_USER, | 19 ERROR_NOT_ALLOWED_PRIMARY_USER, |
20 // Disallowed due to no eligible users. | 20 // Disallowed due to no eligible users. |
21 ERROR_NO_ELIGIBLE_USERS, | 21 ERROR_NO_ELIGIBLE_USERS, |
22 // Disallowed due to reaching maximum supported user. | 22 // Disallowed due to reaching maximum supported user. |
23 ERROR_MAXIMUM_USERS_REACHED, | 23 ERROR_MAXIMUM_USERS_REACHED, |
24 }; | 24 }; |
25 | 25 |
26 // Defines the cycle direction for |CycleActiveUser|. | |
27 enum class CycleUser { | |
James Cook
2017/03/02 00:13:34
I think this would be clearer as:
enum class Cycl
xiyuan
2017/03/02 21:27:45
Done.
| |
28 CYCLE_TO_NEXT_USER = 0, // Cycle to the next user. | |
29 CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user. | |
30 }; | |
31 | |
26 } // namespace ash | 32 } // namespace ash |
27 | 33 |
28 #endif // ASH_PUBLIC_CPP_SESSION_TYPES_H_ | 34 #endif // ASH_PUBLIC_CPP_SESSION_TYPES_H_ |
OLD | NEW |