OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_sc
reen.h" | 5 #include "chrome/browser/chromeos/login/managed/locally_managed_user_creation_sc
reen.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/cros/network_library.h" | 7 #include "chrome/browser/chromeos/cros/network_library.h" |
8 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 8 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
9 #include "chrome/browser/chromeos/login/managed/locally_managed_user_controller.
h" | 9 #include "chrome/browser/chromeos/login/managed/locally_managed_user_controller.
h" |
10 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 10 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 void LocallyManagedUserCreationScreen::AbortFlow() { | 129 void LocallyManagedUserCreationScreen::AbortFlow() { |
130 controller_->FinishCreation(); | 130 controller_->FinishCreation(); |
131 } | 131 } |
132 | 132 |
133 void LocallyManagedUserCreationScreen::FinishFlow() { | 133 void LocallyManagedUserCreationScreen::FinishFlow() { |
134 controller_->FinishCreation(); | 134 controller_->FinishCreation(); |
135 } | 135 } |
136 | 136 |
137 void LocallyManagedUserCreationScreen::AuthenticateManager( | 137 void LocallyManagedUserCreationScreen::AuthenticateManager( |
138 std::string& manager_id, | 138 const std::string& manager_id, |
139 std::string& manager_password) { | 139 const std::string& manager_password) { |
140 // Make sure no two controllers exist at the same time. | 140 // Make sure no two controllers exist at the same time. |
141 controller_.reset(); | 141 controller_.reset(); |
142 controller_.reset(new LocallyManagedUserController(this)); | 142 controller_.reset(new LocallyManagedUserController(this)); |
143 | 143 |
144 ExistingUserController::current_controller()-> | 144 ExistingUserController::current_controller()-> |
145 Login(UserContext(manager_id, | 145 Login(UserContext(manager_id, |
146 manager_password, | 146 manager_password, |
147 std::string() /* auth_code */)); | 147 std::string() /* auth_code */)); |
148 } | 148 } |
149 | 149 |
150 void LocallyManagedUserCreationScreen::CreateManagedUser( | 150 void LocallyManagedUserCreationScreen::CreateManagedUser( |
151 string16& display_name, | 151 const string16& display_name, |
152 std::string& managed_user_password) { | 152 const std::string& managed_user_password) { |
153 DCHECK(controller_.get()); | 153 DCHECK(controller_.get()); |
154 controller_->SetUpCreation(display_name, managed_user_password); | 154 controller_->SetUpCreation(display_name, managed_user_password); |
155 controller_->StartCreation(); | 155 controller_->StartCreation(); |
156 } | 156 } |
157 | 157 |
158 void LocallyManagedUserCreationScreen::OnManagerLoginFailure() { | 158 void LocallyManagedUserCreationScreen::OnManagerLoginFailure() { |
159 if (actor_) | 159 if (actor_) |
160 actor_->ShowManagerPasswordError(); | 160 actor_->ShowManagerPasswordError(); |
161 } | 161 } |
162 | 162 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 WizardController::default_controller()-> | 221 WizardController::default_controller()-> |
222 AdvanceToScreenWithParams(WizardController::kUserImageScreenName, params); | 222 AdvanceToScreenWithParams(WizardController::kUserImageScreenName, params); |
223 } | 223 } |
224 | 224 |
225 void LocallyManagedUserCreationScreen::OnCreationSuccess() { | 225 void LocallyManagedUserCreationScreen::OnCreationSuccess() { |
226 SelectPicture(); | 226 SelectPicture(); |
227 } | 227 } |
228 | 228 |
229 } // namespace chromeos | 229 } // namespace chromeos |
OLD | NEW |