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

Side by Side Diff: chrome/browser/ui/webui/signin/signin_supervised_user_import_handler.cc

Issue 2058083002: MD User Manager: Error message if pref doesn't allow creating supervised user. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_create_profile_handler_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ui/webui/signin/signin_supervised_user_import_handler.h " 5 #include "chrome/browser/ui/webui/signin/signin_supervised_user_import_handler.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 weak_ptr_factory_.GetWeakPtr()), 161 weak_ptr_factory_.GetWeakPtr()),
162 base::string16(), std::string(), std::string()); 162 base::string16(), std::string(), std::string());
163 } 163 }
164 164
165 void SigninSupervisedUserImportHandler::LoadCustodianProfileCallback( 165 void SigninSupervisedUserImportHandler::LoadCustodianProfileCallback(
166 Profile* profile, Profile::CreateStatus status) { 166 Profile* profile, Profile::CreateStatus status) {
167 167
168 // This method gets called once before with Profile::CREATE_STATUS_CREATED. 168 // This method gets called once before with Profile::CREATE_STATUS_CREATED.
169 switch (status) { 169 switch (status) {
170 case Profile::CREATE_STATUS_LOCAL_FAIL: { 170 case Profile::CREATE_STATUS_LOCAL_FAIL: {
171 // TODO(mahmadi): see if a better error message is required here.
172 RejectCallback(GetLocalErrorMessage()); 171 RejectCallback(GetLocalErrorMessage());
173 break; 172 break;
174 } 173 }
175 case Profile::CREATE_STATUS_CREATED: { 174 case Profile::CREATE_STATUS_CREATED: {
176 // Ignore the intermediate status. 175 // Ignore the intermediate status.
177 break; 176 break;
178 } 177 }
179 case Profile::CREATE_STATUS_INITIALIZED: { 178 case Profile::CREATE_STATUS_INITIALIZED: {
180 // We are only interested in Profile::CREATE_STATUS_INITIALIZED when 179 // We are only interested in Profile::CREATE_STATUS_INITIALIZED when
181 // everything is ready. 180 // everything is ready.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 302
304 bool SigninSupervisedUserImportHandler::HasAuthError(Profile* profile) const { 303 bool SigninSupervisedUserImportHandler::HasAuthError(Profile* profile) const {
305 SigninErrorController* error_controller = 304 SigninErrorController* error_controller =
306 SigninErrorControllerFactory::GetForProfile(profile); 305 SigninErrorControllerFactory::GetForProfile(profile);
307 if (!error_controller) 306 if (!error_controller)
308 return true; 307 return true;
309 308
310 GoogleServiceAuthError::State state = error_controller->auth_error().state(); 309 GoogleServiceAuthError::State state = error_controller->auth_error().state();
311 return state != GoogleServiceAuthError::NONE; 310 return state != GoogleServiceAuthError::NONE;
312 } 311 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_create_profile_handler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698