| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/managed/locally_managed_user_creation_fl
ow.h" | 5 #include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_fl
ow.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/chromeos/login/login_display_host_impl.h" | 10 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
| 10 #include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_sc
reen.h" | 11 #include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_sc
reen.h" |
| 11 #include "chrome/browser/chromeos/login/wizard_controller.h" | 12 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 13 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 12 | 14 |
| 13 namespace chromeos { | 15 namespace chromeos { |
| 14 | 16 |
| 15 namespace { | 17 namespace { |
| 16 | 18 |
| 17 LocallyManagedUserCreationScreen* GetScreen(LoginDisplayHost* host) { | 19 LocallyManagedUserCreationScreen* GetScreen(LoginDisplayHost* host) { |
| 18 DCHECK(host); | 20 DCHECK(host); |
| 19 DCHECK(host->GetWizardController()); | 21 DCHECK(host->GetWizardController()); |
| 20 DCHECK(host->GetWizardController()->GetLocallyManagedUserCreationScreen()); | 22 DCHECK(host->GetWizardController()->GetLocallyManagedUserCreationScreen()); |
| 21 return host->GetWizardController()->GetLocallyManagedUserCreationScreen(); | 23 return host->GetWizardController()->GetLocallyManagedUserCreationScreen(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 82 |
| 81 bool LocallyManagedUserCreationFlow::HandlePasswordChangeDetected() { | 83 bool LocallyManagedUserCreationFlow::HandlePasswordChangeDetected() { |
| 82 GetScreen(host())->ShowManagerInconsistentStateErrorScreen(); | 84 GetScreen(host())->ShowManagerInconsistentStateErrorScreen(); |
| 83 return true; | 85 return true; |
| 84 } | 86 } |
| 85 | 87 |
| 86 void LocallyManagedUserCreationFlow::LaunchExtraSteps( | 88 void LocallyManagedUserCreationFlow::LaunchExtraSteps( |
| 87 Profile* profile) { | 89 Profile* profile) { |
| 88 logged_in_ = true; | 90 logged_in_ = true; |
| 89 manager_profile_ = profile; | 91 manager_profile_ = profile; |
| 92 g_browser_process->platform_part()->profile_helper()->ProfileStartup( |
| 93 profile, |
| 94 true); |
| 95 |
| 90 if (token_validated_ && logged_in_) | 96 if (token_validated_ && logged_in_) |
| 91 GetScreen(host())->OnManagerFullyAuthenticated(manager_profile_); | 97 GetScreen(host())->OnManagerFullyAuthenticated(manager_profile_); |
| 92 else | 98 else |
| 93 GetScreen(host())->OnManagerCryptohomeAuthenticated(); | 99 GetScreen(host())->OnManagerCryptohomeAuthenticated(); |
| 94 } | 100 } |
| 95 | 101 |
| 96 } // namespace chromeos | 102 } // namespace chromeos |
| OLD | NEW |