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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 15774008: Pass errors generated during limited-user registration up to the UI for display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressed Drew's comments Created 7 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 | Annotate | Revision Log
OLDNEW
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/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/chromeos/chromeos_version.h" 10 #include "base/chromeos/chromeos_version.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 Profile::CreateStatus status) { 440 Profile::CreateStatus status) {
441 CHECK(user_profile); 441 CHECK(user_profile);
442 442
443 switch (status) { 443 switch (status) {
444 case Profile::CREATE_STATUS_INITIALIZED: 444 case Profile::CREATE_STATUS_INITIALIZED:
445 UserProfileInitialized(user_profile); 445 UserProfileInitialized(user_profile);
446 break; 446 break;
447 case Profile::CREATE_STATUS_CREATED: 447 case Profile::CREATE_STATUS_CREATED:
448 InitProfilePreferences(user_profile); 448 InitProfilePreferences(user_profile);
449 break; 449 break;
450 case Profile::CREATE_STATUS_FAIL: 450 case Profile::CREATE_STATUS_LOCAL_FAIL:
451 default: 451 case Profile::CREATE_STATUS_REMOTE_FAIL:
452 case Profile::MAX_CREATE_STATUS:
452 NOTREACHED(); 453 NOTREACHED();
453 break; 454 break;
454 } 455 }
455 } 456 }
456 457
457 void LoginUtilsImpl::UserProfileInitialized(Profile* user_profile) { 458 void LoginUtilsImpl::UserProfileInitialized(Profile* user_profile) {
458 BootTimesLoader* btl = BootTimesLoader::Get(); 459 BootTimesLoader* btl = BootTimesLoader::Get();
459 btl->AddLoginTimeMarker("UserProfileGotten", false); 460 btl->AddLoginTimeMarker("UserProfileGotten", false);
460 461
461 if (using_oauth_) { 462 if (using_oauth_) {
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 bool LoginUtils::IsWhitelisted(const std::string& username) { 917 bool LoginUtils::IsWhitelisted(const std::string& username) {
917 CrosSettings* cros_settings = CrosSettings::Get(); 918 CrosSettings* cros_settings = CrosSettings::Get();
918 bool allow_new_user = false; 919 bool allow_new_user = false;
919 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 920 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
920 if (allow_new_user) 921 if (allow_new_user)
921 return true; 922 return true;
922 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 923 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
923 } 924 }
924 925
925 } // namespace chromeos 926 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/managed_mode/managed_user_registration_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698