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 #include "chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h" | 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_login_flow.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/prefs/pref_registry_simple.h" | 11 #include "base/prefs/pref_registry_simple.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/chromeos/login/login_utils.h" | 14 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
15 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio
n.h" | 15 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio
n.h" |
16 #include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h" | 16 #include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h" |
17 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre
en.h" | 17 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre
en.h" |
18 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 18 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
19 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 19 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
20 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 20 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
21 #include "chrome/browser/chromeos/login/wizard_controller.h" | 21 #include "chrome/browser/chromeos/login/wizard_controller.h" |
22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
23 #include "chromeos/login/auth/key.h" | 23 #include "chromeos/login/auth/key.h" |
24 #include "components/user_manager/user_manager.h" | 24 #include "components/user_manager/user_manager.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 auth->MarkKeyIncomplete(user_id(), true /* incomplete */); | 245 auth->MarkKeyIncomplete(user_id(), true /* incomplete */); |
246 | 246 |
247 UMA_HISTOGRAM_ENUMERATION( | 247 UMA_HISTOGRAM_ENUMERATION( |
248 "ManagedUsers.ChromeOS.PasswordChange", | 248 "ManagedUsers.ChromeOS.PasswordChange", |
249 SupervisedUserAuthentication::PASSWORD_CHANGED_IN_USER_SESSION, | 249 SupervisedUserAuthentication::PASSWORD_CHANGED_IN_USER_SESSION, |
250 SupervisedUserAuthentication::PASSWORD_CHANGE_RESULT_MAX_VALUE); | 250 SupervisedUserAuthentication::PASSWORD_CHANGE_RESULT_MAX_VALUE); |
251 Finish(); | 251 Finish(); |
252 } | 252 } |
253 | 253 |
254 void SupervisedUserLoginFlow::Finish() { | 254 void SupervisedUserLoginFlow::Finish() { |
255 LoginUtils::Get()->DoBrowserLaunch(profile_, host()); | 255 UserSessionManager::GetInstance()->DoBrowserLaunch(profile_, host()); |
256 profile_ = NULL; | 256 profile_ = NULL; |
257 UnregisterFlowSoon(); | 257 UnregisterFlowSoon(); |
258 } | 258 } |
259 | 259 |
260 void SupervisedUserLoginFlow::LaunchExtraSteps( | 260 void SupervisedUserLoginFlow::LaunchExtraSteps( |
261 Profile* profile) { | 261 Profile* profile) { |
262 profile_ = profile; | 262 profile_ = profile; |
263 ChromeUserManager::Get()->GetSupervisedUserManager()->LoadSupervisedUserToken( | 263 ChromeUserManager::Get()->GetSupervisedUserManager()->LoadSupervisedUserToken( |
264 profile, | 264 profile, |
265 base::Bind(&SupervisedUserLoginFlow::OnSyncSetupDataLoaded, | 265 base::Bind(&SupervisedUserLoginFlow::OnSyncSetupDataLoaded, |
266 weak_factory_.GetWeakPtr())); | 266 weak_factory_.GetWeakPtr())); |
267 } | 267 } |
268 | 268 |
269 } // namespace chromeos | 269 } // namespace chromeos |
OLD | NEW |