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

Side by Side Diff: chrome/browser/chromeos/login/managed/locally_managed_user_creation_screen.cc

Issue 14208014: Simplify adding callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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/error_screen.h" 8 #include "chrome/browser/chromeos/login/error_screen.h"
9 #include "chrome/browser/chromeos/login/existing_user_controller.h" 9 #include "chrome/browser/chromeos/login/existing_user_controller.h"
10 #include "chrome/browser/chromeos/login/managed/locally_managed_user_controller. h" 10 #include "chrome/browser/chromeos/login/managed/locally_managed_user_controller. h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 void LocallyManagedUserCreationScreen::FinishFlow() { 134 void LocallyManagedUserCreationScreen::FinishFlow() {
135 controller_->FinishCreation(); 135 controller_->FinishCreation();
136 } 136 }
137 137
138 void LocallyManagedUserCreationScreen::RetryLastStep() { 138 void LocallyManagedUserCreationScreen::RetryLastStep() {
139 controller_->RetryLastStep(); 139 controller_->RetryLastStep();
140 } 140 }
141 141
142 void LocallyManagedUserCreationScreen::RunFlow( 142 void LocallyManagedUserCreationScreen::RunFlow(
143 string16& display_name, 143 const string16& display_name,
144 std::string& managed_user_password, 144 const std::string& managed_user_password,
145 std::string& manager_id, 145 const std::string& manager_id,
146 std::string& manager_password) { 146 const std::string& manager_password) {
147 147
148 // Make sure no two controllers exist at the same time. 148 // Make sure no two controllers exist at the same time.
149 controller_.reset(); 149 controller_.reset();
150 controller_.reset(new LocallyManagedUserController(this)); 150 controller_.reset(new LocallyManagedUserController(this));
151 controller_->SetUpCreation(display_name, managed_user_password); 151 controller_->SetUpCreation(display_name, managed_user_password);
152 152
153 ExistingUserController::current_controller()-> 153 ExistingUserController::current_controller()->
154 Login(UserContext(manager_id, 154 Login(UserContext(manager_id,
155 manager_password, 155 manager_password,
156 std::string() /* auth_code */)); 156 std::string() /* auth_code */));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 WizardController::default_controller()-> 218 WizardController::default_controller()->
219 AdvanceToScreenWithParams(WizardController::kUserImageScreenName, params); 219 AdvanceToScreenWithParams(WizardController::kUserImageScreenName, params);
220 } 220 }
221 221
222 void LocallyManagedUserCreationScreen::OnCreationSuccess() { 222 void LocallyManagedUserCreationScreen::OnCreationSuccess() {
223 SelectPicture(); 223 SelectPicture();
224 } 224 }
225 225
226 } // namespace chromeos 226 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698