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 CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "ash/public/interfaces/lock_screen.mojom.h" | |
12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "chrome/browser/chromeos/login/screens/base_screen.h" | 17 #include "chrome/browser/chromeos/login/screens/base_screen.h" |
17 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" | 18 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" |
18 #include "chrome/browser/chromeos/login/ui/login_display.h" | 19 #include "chrome/browser/chromeos/login/ui/login_display.h" |
19 #include "components/proximity_auth/screenlock_bridge.h" | 20 #include "components/proximity_auth/screenlock_bridge.h" |
20 #include "components/signin/core/account_id/account_id.h" | 21 #include "components/signin/core/account_id/account_id.h" |
21 #include "components/user_manager/user.h" | 22 #include "components/user_manager/user.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 base::DictionaryValue* user_dict); | 109 base::DictionaryValue* user_dict); |
109 | 110 |
110 // Fills |user_dict| with |user| multi-profile related preferences. | 111 // Fills |user_dict| with |user| multi-profile related preferences. |
111 static void FillMultiProfileUserPrefs(user_manager::User* user, | 112 static void FillMultiProfileUserPrefs(user_manager::User* user, |
112 base::DictionaryValue* user_dict, | 113 base::DictionaryValue* user_dict, |
113 bool is_signin_to_add); | 114 bool is_signin_to_add); |
114 | 115 |
115 // Determines if user auth status requires online sign in. | 116 // Determines if user auth status requires online sign in. |
116 static bool ShouldForceOnlineSignIn(const user_manager::User* user); | 117 static bool ShouldForceOnlineSignIn(const user_manager::User* user); |
117 | 118 |
119 // Fills |user_info| with information about |user|. | |
120 // TODO: Public sesssions exist in login screen, but not lock screen. | |
121 // We will need public session locales in the furture when we change login | |
122 // screen to view-based as well. See crbug.com/732452. | |
123 static void FillUserMojoStruct(user_manager::User* user, | |
xiyuan
2017/06/13 18:00:18
nit: user_manager::User* -> const user_manager::Us
xiaoyinh(OOO Sep 11-29)
2017/06/13 22:21:31
Done.
| |
124 bool is_owner, | |
125 bool is_signin_to_add, | |
126 AuthType auth_type, | |
127 ash::mojom::LoginUserInfo& user_info); | |
xiyuan
2017/06/13 18:00:18
nit: For function to initialize a struct, the prev
xiaoyinh(OOO Sep 11-29)
2017/06/13 22:21:31
Done.
| |
128 | |
129 static void FillMultiProfileUserPrefsInMojo( | |
130 user_manager::User* user, | |
xiyuan
2017/06/13 18:00:18
nit: const user_manager::User*
xiaoyinh(OOO Sep 11-29)
2017/06/13 22:21:31
This method is inlined in FillUserMojoStruct.
| |
131 ash::mojom::LoginUserInfo& user_info, | |
xiyuan
2017/06/13 18:00:18
nit: ash::mojom::LoginUserInfo& -> ash::mojom::Log
xiaoyinh(OOO Sep 11-29)
2017/06/13 22:21:31
Thanks for the information!
This method is inline
| |
132 bool is_signin_to_add); | |
133 | |
118 std::unique_ptr<base::ListValue> PrepareUserList(); | 134 std::unique_ptr<base::ListValue> PrepareUserList(); |
135 std::vector<ash::mojom::LoginUserInfoPtr> PrepareUserListToMojo(); | |
119 | 136 |
120 protected: | 137 protected: |
121 UserBoardView* view_ = nullptr; | 138 UserBoardView* view_ = nullptr; |
122 | 139 |
123 // Map from public session account IDs to recommended locales set by policy. | 140 // Map from public session account IDs to recommended locales set by policy. |
124 std::map<AccountId, std::vector<std::string>> | 141 std::map<AccountId, std::vector<std::string>> |
125 public_session_recommended_locales_; | 142 public_session_recommended_locales_; |
126 | 143 |
127 private: | 144 private: |
128 class DircryptoMigrationChecker; | 145 class DircryptoMigrationChecker; |
(...skipping 30 matching lines...) Expand all Loading... | |
159 user_manager::UserList users_to_send_; | 176 user_manager::UserList users_to_send_; |
160 | 177 |
161 base::WeakPtrFactory<UserSelectionScreen> weak_factory_; | 178 base::WeakPtrFactory<UserSelectionScreen> weak_factory_; |
162 | 179 |
163 DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen); | 180 DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen); |
164 }; | 181 }; |
165 | 182 |
166 } // namespace chromeos | 183 } // namespace chromeos |
167 | 184 |
168 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ | 185 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ |
OLD | NEW |