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

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

Issue 16002004: Added login screen mode for adding users into session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WebUI test fixed. 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
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 profile, 305 profile,
306 base::FilePath(), 306 base::FilePath(),
307 chrome::startup::IS_PROCESS_STARTUP, 307 chrome::startup::IS_PROCESS_STARTUP,
308 first_run, 308 first_run,
309 &return_code); 309 &return_code);
310 310
311 // Mark login host for deletion after browser starts. This 311 // Mark login host for deletion after browser starts. This
312 // guarantees that the message loop will be referenced by the 312 // guarantees that the message loop will be referenced by the
313 // browser before it is dereferenced by the login host. 313 // browser before it is dereferenced by the login host.
314 if (login_host) 314 if (login_host)
315 login_host->OnSessionStart(); 315 login_host->Finalize();
316 UserManager::Get()->SessionStarted(); 316 UserManager::Get()->SessionStarted();
317 } 317 }
318 318
319 void LoginUtilsImpl::PrepareProfile( 319 void LoginUtilsImpl::PrepareProfile(
320 const UserContext& user_context, 320 const UserContext& user_context,
321 const std::string& display_email, 321 const std::string& display_email,
322 bool using_oauth, 322 bool using_oauth,
323 bool has_cookies, 323 bool has_cookies,
324 bool has_active_session, 324 bool has_active_session,
325 LoginUtils::Delegate* delegate) { 325 LoginUtils::Delegate* delegate) {
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 bool LoginUtils::IsWhitelisted(const std::string& username) { 916 bool LoginUtils::IsWhitelisted(const std::string& username) {
917 CrosSettings* cros_settings = CrosSettings::Get(); 917 CrosSettings* cros_settings = CrosSettings::Get();
918 bool allow_new_user = false; 918 bool allow_new_user = false;
919 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 919 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
920 if (allow_new_user) 920 if (allow_new_user)
921 return true; 921 return true;
922 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); 922 return cros_settings->FindEmailInList(kAccountsPrefUsers, username);
923 } 923 }
924 924
925 } // namespace chromeos 925 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_display_host_impl.cc ('k') | chrome/browser/chromeos/login/mock_login_display_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698