Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: ash/public/interfaces/session_controller_traits.h

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Rename HandleAdAuth. Use system_api enums Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/public/interfaces/session_controller.mojom ('k') | chrome/browser/chromeos/login/helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_INTERFACES_SESSION_CONTROLLER_TRAITS_H_ 5 #ifndef ASH_PUBLIC_INTERFACES_SESSION_CONTROLLER_TRAITS_H_
6 #define ASH_PUBLIC_INTERFACES_SESSION_CONTROLLER_TRAITS_H_ 6 #define ASH_PUBLIC_INTERFACES_SESSION_CONTROLLER_TRAITS_H_
7 7
8 #include "ash/public/cpp/session_types.h" 8 #include "ash/public/cpp/session_types.h"
9 #include "ash/public/interfaces/session_controller.mojom.h" 9 #include "ash/public/interfaces/session_controller.mojom.h"
10 #include "components/session_manager/session_manager_types.h" 10 #include "components/session_manager/session_manager_types.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 case user_manager::USER_TYPE_PUBLIC_ACCOUNT: 76 case user_manager::USER_TYPE_PUBLIC_ACCOUNT:
77 return ash::mojom::UserType::PUBLIC_ACCOUNT; 77 return ash::mojom::UserType::PUBLIC_ACCOUNT;
78 case user_manager::USER_TYPE_SUPERVISED: 78 case user_manager::USER_TYPE_SUPERVISED:
79 return ash::mojom::UserType::SUPERVISED; 79 return ash::mojom::UserType::SUPERVISED;
80 case user_manager::USER_TYPE_KIOSK_APP: 80 case user_manager::USER_TYPE_KIOSK_APP:
81 return ash::mojom::UserType::KIOSK; 81 return ash::mojom::UserType::KIOSK;
82 case user_manager::USER_TYPE_CHILD: 82 case user_manager::USER_TYPE_CHILD:
83 return ash::mojom::UserType::CHILD; 83 return ash::mojom::UserType::CHILD;
84 case user_manager::USER_TYPE_ARC_KIOSK_APP: 84 case user_manager::USER_TYPE_ARC_KIOSK_APP:
85 return ash::mojom::UserType::ARC_KIOSK; 85 return ash::mojom::UserType::ARC_KIOSK;
86 case user_manager::USER_TYPE_ACTIVE_DIRECTORY:
87 return ash::mojom::UserType::ACTIVE_DIRECTORY;
86 case user_manager::NUM_USER_TYPES: 88 case user_manager::NUM_USER_TYPES:
87 // Bail as this is not a valid user type. 89 // Bail as this is not a valid user type.
88 break; 90 break;
89 } 91 }
90 NOTREACHED(); 92 NOTREACHED();
91 return ash::mojom::UserType::REGULAR; 93 return ash::mojom::UserType::REGULAR;
92 } 94 }
93 95
94 static bool FromMojom(ash::mojom::UserType input, 96 static bool FromMojom(ash::mojom::UserType input,
95 user_manager::UserType* out) { 97 user_manager::UserType* out) {
(...skipping 12 matching lines...) Expand all
108 return true; 110 return true;
109 case ash::mojom::UserType::KIOSK: 111 case ash::mojom::UserType::KIOSK:
110 *out = user_manager::USER_TYPE_KIOSK_APP; 112 *out = user_manager::USER_TYPE_KIOSK_APP;
111 return true; 113 return true;
112 case ash::mojom::UserType::CHILD: 114 case ash::mojom::UserType::CHILD:
113 *out = user_manager::USER_TYPE_CHILD; 115 *out = user_manager::USER_TYPE_CHILD;
114 return true; 116 return true;
115 case ash::mojom::UserType::ARC_KIOSK: 117 case ash::mojom::UserType::ARC_KIOSK:
116 *out = user_manager::USER_TYPE_ARC_KIOSK_APP; 118 *out = user_manager::USER_TYPE_ARC_KIOSK_APP;
117 return true; 119 return true;
120 case ash::mojom::UserType::ACTIVE_DIRECTORY:
121 *out = user_manager::USER_TYPE_ACTIVE_DIRECTORY;
122 return true;
118 } 123 }
119 NOTREACHED(); 124 NOTREACHED();
120 return false; 125 return false;
121 } 126 }
122 }; 127 };
123 128
124 template <> 129 template <>
125 struct EnumTraits<ash::mojom::AddUserSessionPolicy, ash::AddUserSessionPolicy> { 130 struct EnumTraits<ash::mojom::AddUserSessionPolicy, ash::AddUserSessionPolicy> {
126 static ash::mojom::AddUserSessionPolicy ToMojom( 131 static ash::mojom::AddUserSessionPolicy ToMojom(
127 ash::AddUserSessionPolicy input) { 132 ash::AddUserSessionPolicy input) {
(...skipping 28 matching lines...) Expand all
156 return true; 161 return true;
157 } 162 }
158 NOTREACHED(); 163 NOTREACHED();
159 return false; 164 return false;
160 } 165 }
161 }; 166 };
162 167
163 } // namespace mojo 168 } // namespace mojo
164 169
165 #endif // ASH_PUBLIC_INTERFACES_SESSION_CONTROLLER_TRAITS_H_ 170 #endif // ASH_PUBLIC_INTERFACES_SESSION_CONTROLLER_TRAITS_H_
OLDNEW
« no previous file with comments | « ash/public/interfaces/session_controller.mojom ('k') | chrome/browser/chromeos/login/helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698